SUMMARY: CPU monitoring script with MRTG

From: sridhara pk (sridharapk_at_rediffmail.com)
Date: 12/15/03

  • Next message: Larry Anta: "SUMMARY: Sun Fire V480 and ce.conf for Onboard Ethernet Interfaces"
    Date: 15 Dec 2003 16:08:30 -0000
    To: sunmanagers@sunmanagers.org
    
    

    Hello Managers,
    Here is the script which I was ultimately was able to find out
    from my linux collegue

    ##########Starting of the script#########
    #!/bin/sh
    #
    first the load 5 and 15 min avg
    # multiply * 100 to avoid floats
    # it helps if
    mrtg "period" is a multiple of 5 mins
    uptime | sed -e 's/^.*average.*:
    \(.*\)$/\1/' -e 's/ //g' |
    awk -F, '{ printf("%.0f\n",$2*100);
    printf("%.0f\n",$3*100) }'
    # the uptime
    uptime | sed 's:^.* up \(.*\),
    [0-9][0-9]* users.*$:\1:'
    # my name
    uname -n
    ##########End of
    Script##################

    Regards

    Sridhara

    On Mon, 15 Dec 2003 sridhara pk
    wrote :
    >Hello Managers,
    >can somebody send me a script to monitor CPU
    utilization usig
    >MRTG
    >
    >Thanks in advance
    >Sridhara
    >_______________________________________________
    >sunmanagers mailing list
    >sunmanagers@sunmanagers.org
    >http://www.sunmanagers.org/mailman/listinfo/sunmanagers
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Larry Anta: "SUMMARY: Sun Fire V480 and ce.conf for Onboard Ethernet Interfaces"

    Relevant Pages

    • Re: One other related Q Re: basic Q: Only one way to make vars live outside of the scope of a functi
      ... >>> directly to the calling script, without having to use global variables ... to get multiple return items from a subprocedure. ... >>> better not to mix scope and use global variables for multiple return ... before terminating the object reference. ...
      (microsoft.public.scripting.vbscript)
    • Re: Can you have a command line arg with a workbook?
      ... "Patrick Molloy" wrote: ... but I guess I would still need the multiple IF statements (or ... Case if that works in VBScript?) ... this script starts a new instance of Excel. ...
      (microsoft.public.excel.programming)
    • Re: Pattern for foo tool <-> API <-> shell|GUI
      ... The user can execute a Python script in the shell, ... There are multiple command ... where the command-line handler might look something like:: ... documentation of generate-- and any other methods that accept handler ...
      (comp.lang.python)
    • Re: shell script
      ... |> i need a shell script that can create multiple users.... ... If you setup 1000 users with this, and I want to steal some accounts, all I need to do is login to my account, cat /etc/passwd then login to some of the other accounts that have yet to be 'activated' and change the passwords myself. ... You could probably write a wrapper script or a script to generate /etc/shadow and /etc/passwd entries and depending on how you wanted your users grouped, /etc/group entries as well and then create thir home directory, chown it to the newly created user and copy the contents of /etc/skel to the new home directory, chowning it in the process. ...
      (RedHat)
    • Re: WMI and 2003 SP1
      ... | This is part of a script I run on multiple versions of Windows.... ... | sCompName = oShell.ExpandEnvironmentStrings ... I see a query to LDAP for multiple ... Set colOperatingSystems = objWMIService.ExecQuery _ ...
      (microsoft.public.scripting.vbscript)