Ad Widget

Collapse

How to get top cpu/memory processes from windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • easy_john
    Junior Member
    • Jan 2008
    • 28

    #1

    How to get top cpu/memory processes from windows

    I looking for sollution to get string with top cpu/memory process from windows servers.
    Looks like: "idle.exe 90% netlogon.exe 10% ..."

    I get this string from linux with this little script:
    echo `ps axk -pcpu o pcpu,comm|head -n6|tail -n5|tr -d [:cntrl:]`

    Is it possible to get it from windows?

    P.S. Very necessary for you to have person, who will moderate a forum, delete a spam, and the main thing - operatively to help users with their questions.
  • thiagomz
    Member
    • Jan 2010
    • 74

    #2
    Up

    I need the same here ! Anyone ?

    Comment

    • easy_john
      Junior Member
      • Jan 2008
      • 28

      #3
      still nothing. may be some powep script ?

      Comment

      • easy_john
        Junior Member
        • Jan 2008
        • 28

        #4
        i mean power shell.

        Comment

        • RHP-997
          Junior Member
          • May 2011
          • 8

          #5
          windows process list

          I know this thread is a bit old, but I'm also looking for a way to have Zabbix generate an email containing a list of the top processes on a windows machine. I am new to Zabbix, so I have started working this from the windows side. I've come up with this command to generate a decent list:

          tasklist /s [hostname] /v /FI "CPUTIME gt 00:25:00"

          This generates a list of processes that have >25 minutes cpu time. Only thing I need now is to output it, have Zabbix pick it up, and email it.

          Comment

          • easy_john
            Junior Member
            • Jan 2008
            • 28

            #6
            nice.

            tasklist /v /FI "CPUTIME gt 00:25:00"
            and
            tasklist /FI "MEMUSAGE ge 10000"

            list top cpu/mem usage process.
            now we need to cut only 2-3 column and can import to zabbix.

            Comment

            • RHP-997
              Junior Member
              • May 2011
              • 8

              #7
              output

              What if we had the tasklist command output to a text file and had zabbix pick that up?

              tasklist /s [hostname] /v /FI "CPUTIME gt 00:25:00" > c:\top5.txt

              Comment

              • easy_john
                Junior Member
                • Jan 2008
                • 28

                #8
                no, you can directly take some output to zabbix.
                but you need decrease amount of columns a bit.
                in zabbix_agentd.conf :
                UserParameter=custom.top.cpu,"bla-bla"

                Comment

                • RHP-997
                  Junior Member
                  • May 2011
                  • 8

                  #9
                  Originally posted by easy_john
                  no, you can directly take some output to zabbix.
                  but you need decrease amount of columns a bit.
                  in zabbix_agentd.conf :
                  UserParameter=custom.top.cpu,"bla-bla"
                  Ok cool so the "bla-bla" would be the windows command?

                  tasklist /s [hostname] /v /FI "CPUTIME gt 00:25:00"

                  If so, that's nice and simple!

                  Comment

                  • easy_john
                    Junior Member
                    • Jan 2008
                    • 28

                    #10
                    Originally posted by RHP-997
                    Ok cool so the "bla-bla" would be the windows command?

                    tasklist /s [hostname] /v /FI "CPUTIME gt 00:25:00"

                    If so, that's nice and simple!
                    No "/s [hostname]", because you already on some host.
                    And this script produce to big output, it will be unreadable in one string, like zabbix store it to base.
                    You need reduce output.
                    I store linux top cpu/mem process and it looks like this:
                    [2011.May.04 18:12:05] 1.2 mysqld 2.9 apache2 2.7 apache2 2.7 apache2 2.8 apache2
                    [2011.May.04 18:11:35] 1.2 mysqld 2.9 apache2 2.7 apache2 2.7 apache2 2.8 apache2
                    [2011.May.04 18:11:09] 1.2 mysqld 2.9 apache2 2.7 apache2 2.7 apache2 2.8 apache2
                    [2011.May.04 18:10:37] 1.2 mysqld 2.9 apache2 2.7 apache2 2.7 apache2 2.8 apache2
                    [2011.May.04 18:10:06] 1.2 mysqld 2.9 apache2 2.7 apache2 2.7 apache2 2.8 apache2

                    Comment

                    Working...