NFSiostat Plotter V4

Introduction

After I finished nfsiostat_plotter_v3 I had several requests for a new feature. I admit that I didn’t make it clear that the nfsiostat script needed a file named “iostat_file.pickle” and this caused some confusion. Let me explain.

Nfsiostat does not collect CPU stats and I wanted to be able to plots CPU usage versus the NFS read and write usage. The only way to get that data is to run iostat when you run nfsiostat. Then you process the iostat output using iostat_plotter. That code produces a file name "iostat_file.pickle" which nfsiostat_plotter then uses for the CPU usage information. Yes, it does seem a little complicated for just adding CPU usage data to the plots but that is the way it is.

People got an error in nfsiostat_plotter.py if they didn’t run iotstat_plotter first and they got confused. I didn’t make this step clear. In V4 of nfsiostat_plotter.py, I’ve added the ability to check for the file “iostat_file.pickle”. If the file exists, the plots include CPU usage. If the file does not exist then the CPU usage is not included in the plots.

You can download V4 of nfsiostat_plotter.py from this link. I hope this version is a little more understandable.

BTW – I know the code is not the best code or very Pythonic but I intended the code to be be sort of a throw away code to illustrate a point. But people are actually using it so I’m going to start a re-write of the code to make better use of objects and code reuse (this is a very large amount of code replication). Stay tuned – maybe I can get this out fairly soon.

Advertisements

5 Responses to NFSiostat Plotter V4

  1. Pingback: NFSiostat_plotter V4 | clusterbuffer

  2. Dmirty I. says:

    hmmm, getting error:
    ===
    reading nfsiostat output file …
    Traceback (most recent call last):
    File “./nfsiostat_plotter_v4.py”, line 1731, in
    local_dict[“rMB_svr”]=[float(currentline[4])];
    ValueError: could not convert string to float: (-0.0%)
    ===
    Have sysstat.x86_64 9.0.4-22.el6

    • Dimitry,

      That looks like the nfsiostat data writes out “-0.0%” and the code gets confused (can’t convert it to a float). Let me take a look at the code and see what I can find out.

      Jeff

  3. flopsy says:

    nfsiostat plotting script (includes iostat data)

    input filename: nfsiostat.out
    Reading iostat_file.pickle

    reading nfsiostat output file …
    Traceback (most recent call last):
    File “./nfsiostat_plotterv4.py”, line 1731, in
    local_dict[“rMB_svr”]=[float(currentline[4])];
    ValueError: could not convert string to float:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: