Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

(Vortacist) Re:

by Vortacist (Pilgrim)
on Jun 06, 2001 at 05:20 UTC ( #86090=note: print w/replies, xml ) Need Help??

in reply to

Well...I tried running this on my machine and I believe there's a problem with this line, near the end:

OS        => $ ,

What's supposed to be after that $? Right now there's just a space.
Please let us know - I look forward to really getting to try this script out.

Replies are listed 'Best First'.
Re: (Vortacist) Re:
by xphase_work (Pilgrim) on Jun 06, 2001 at 16:22 UTC
    OS => $ , is supposed to be $^O, in other words,
    $<ctrl>O. I don't know why It doesn't show up,
    there, but if you click the d/l code it should work.
    What I did was right click d/l code, save it to disk,
    then strip out the ^M's.
      Well, I made sure to right-click and save the code that way (last time I had clicked the d/l link and pasted the code into emacs, which generally works) and despite removing the ^M's, no ^O appeared. So I added it in myself, but then when I tried running monitor, I had this problem:

      Illegal division by zero at line 138.

      That line is in drawvals, and it's:

      $swapUsage = $values{useSwap}/$values{totSwap})*100;

      Not quite sure what's going on there. Is a value for totSwap not being added to %values, perhaps?
      FYI, I am running this script using Perl 5.6.1 on Debian/GNU Linux.

        The only thing that I can think of is that the top command
        on your system is not outputting the same info that mine is,
        mine gives:
        load averages: 0.50, 0.47, 0.41 13:03:12 83 processes: 81 sleeping, 1 running, 1 on cpu Memory: 256M real, 128M free, 64M swap in use, 192M swap free PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND 14600 baw 1 36 0 32M 21M run 7:30 8.06% netscape

        If the Memory: line is different in your output, then the regex
        that pulls the memory info won't place a value into totSwap. This
        is because i'm using array subscripting to pull the values out of
        the @memInfo array. Try changing $memInfo[?] to where the correct
        swap values would be.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://86090]
[choroba]: Maybe the first four got downvoted and were deleted from the list?
LanX what?
marto deletes himself from the all lists
QM deletes himself from all delete lists
LanX passes the blame to jdpatches. ..

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2018-03-20 10:10 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (249 votes). Check out past polls.