- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Help? Script to monitor process cpu and email if o...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 06:42 AM
10-17-2001 06:42 AM
Help? Script to monitor process cpu and email if over 85%
I need to monitor a single process by name not PID and then email if the cpu exceeds 85% for more than say 30 seconds.
Does anyone have any idea on how to do this? A script for ksh is great, perl would be even better.
Thanks,
Craig Sharp
Roush Industries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 06:50 AM
10-17-2001 06:50 AM
Re: Help? Script to monitor process cpu and email if over 85%
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 07:18 AM
10-17-2001 07:18 AM
Re: Help? Script to monitor process cpu and email if over 85%
I think that this might still be better suited for a perl or ksh script so it is portable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 07:24 AM
10-17-2001 07:24 AM
Re: Help? Script to monitor process cpu and email if over 85%
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 07:25 AM
10-17-2001 07:25 AM
Re: Help? Script to monitor process cpu and email if over 85%
It will be too much to put down here. If you have the Pak installed, look at /var/opt/perf/alarmdef file. There are some nice examples in
/opt/perf/examples/adviser directory too that will give you a good direction. It's easy.
Enjoy.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 07:29 AM
10-17-2001 07:29 AM
Re: Help? Script to monitor process cpu and email if over 85%
UNIX95= ps -o pid,comm,pcpu -C
where
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 07:30 AM
10-17-2001 07:30 AM
Re: Help? Script to monitor process cpu and email if over 85%
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 07:40 AM
10-17-2001 07:40 AM
Re: Help? Script to monitor process cpu and email if over 85%
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 07:55 AM
10-17-2001 07:55 AM
Re: Help? Script to monitor process cpu and email if over 85%
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 08:15 AM
10-17-2001 08:15 AM
Re: Help? Script to monitor process cpu and email if over 85%
Attached is an example of a alarmdef definition that you could tweak to do exactly what you want. (You'll have to add the check for the process name)
Just add it to /var/opt/perf/alarmdef and restart the alarm process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2001 09:17 AM
10-17-2001 09:17 AM
Re: Help? Script to monitor process cpu and email if over 85%
In gpm (glance+) you can change the advisor to execute an alarm:
ALARM
gbl_cpu_total_util > 90 FOR 30 SECONDS
gbl_run_queue > 3 FOR 30 SECONDS
START YELLOW ALERT "CPU AT ", gbl_cpu_total_util, "% at ", gbl_stattime
REPEAT EVERY 300 SECONDS {RED ALERT "CPU AT ", gbl_cpu_total_util
exec "/usr/bin/pager -n 555-3456"}
END ALERT "CPU at ", gbl_cpu_total_util, "% at ", gbl_stattime, " - RELAX"