Mirza Dedic wrote: > Is there such a plugin to monitor aix topas utility (topas -P) and > report back processes that have a long running "TIME" value? Better > yet, TIME combined with high CPU value? > > The output of topas -P on a AIX box looks like this: > > _USER PID PPID PRI NI RES RES SPACE TIME CPU% I/O > OTH COMMAND_ > *mirde** **4079860** **3244406** 120 20 1668 1865 1668 > **20**6:26 2**5**.6** 0 0 **_progres* > dougr 4079860 3244406 120 20 1668 1865 1668 6:26 20.6 0 > 0 _progres > prosvra 3412254 4071460 114 20 1453 1561 2033 16:09 18.7 0 > 0 _proapsv > braro 1654968 1 66 20 1388 1865 1793 57:25 1.5 0 > 0 _progres > batch 2613370 1 69 22 1689 1865 1879 7:05 1.2 2 > 1220 _progres > soual 1826826 286914 61 20 1806 1865 1806 0:16 0.8 0 > 3376 _progres > braro 1601808 1 61 20 1957 1865 2410 82:17 0.7 0 > 6 _progres > allbr 1274340 3399852 61 20 2061 1865 2061 0:01 0.5 0 > 2312 _progres > kelca 3407948 1413528 62 20 2207 1865 2207 0:08 0.5 42 > 936 _progres > allbr 2543698 1274340 62 20 208 61 208 0:00 0.4 0 > 3320 ksh > mikko 1032604 2073082 60 20 2522 1865 2522 0:15 0.4 2 > 1255 _progres > larha 3809412 2060626 61 20 2159 1865 2159 0:02 0.4 17 > 115 _progres > kirpa 1605690 3838314 60 20 2558 1865 2558 0:32 0.4 2 > 13 _progres > braro 2732514 1 60 20 1632 1865 2149 13:05 0.3 0 > 0 _progres > braro 1909064 1 60 20 1134 1865 1760 6:20 0.3 0 > 0 _progres > root 2719758 745934 58 41 2431 128 4619 24:25 0.3 0 > 1 topas > judre 549372 1503500 61 20 1798 1865 1798 0:00 0.2 1 > 198 _progres > prosvr 1814718 1 82 20 6374 26 15995 7:21 0.2 1 > 1 java > dorod 2904242 2187728 60 20 2495 1865 2495 6:53 0.2 1 > 930 _progres > linso 3760208 4395326 60 20 1509 1865 1509 0:00 0.1 0 > 2 _progres > katpa 3494134 4280722 60 20 2307 1865 2307 0:03 0.1 0 > 0 _progre > > What I want to capture is, something with 120+ (for TIME) and 20%+ (CPU). > If you've got even basic scripting skills, Nagios plugins are incredibly easy to write. Documentation is here:
http://nagiosplug.sourceforge.net/developer-guidelines.html However, the most basic plugins only need to worry about a couple things: They should have one line of output, and return an exit code of 0 for OK, 1 for warning, 2 for critical, and 3 for unknown. Given that, all you'd need to do is write a simple script that runs that command and parses it looking for times over a certain value, and returns a 1 or a 2 if something crosses your thresholds. ------------------------------------------------------------------------------ _______________________________________________ Nagios-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
