- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shell programing
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
Discussions
Discussions
Discussions
Forums
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
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
тАО06-28-2002 12:52 AM
тАО06-28-2002 12:52 AM
shell programing
Thanks !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2002 01:18 AM
тАО06-28-2002 01:18 AM
Re: shell programing
Hi,
Not quite clear to me what you are after.
I think you will have to explain a bit
more what your problem is.
Regards
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2002 02:38 AM
тАО06-28-2002 02:38 AM
Re: shell programing
Your description sounds like you need simply a software product which allready exists:
lsof
You can download it here:
javascript:openExternal('http://gatekeep.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/')
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2002 04:49 AM
тАО06-28-2002 04:49 AM
Re: shell programing
What I understood from ur question is, U wnat to get PID and user of the processes which are using more 80% of the CPU...Right?
The following script will list the processes which are using above 80% CPU. U can shrink or customize as per ur requirement.
ps -ef |sed '1d'>pall;awk '{print $4}'
for i in `cat pcpu`
do
if [ "$i" -gt 80 ];then
line
done
Best of luck
Shahul
- Tags:
- PS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2002 08:15 AM
тАО07-02-2002 08:15 AM
Re: shell programing
MeasureWare is great for alarming on misbehaving processes. If you have the MeasureWare collection daemon scopeux running, you could place an alarm in /var/opt/perf/alarmdef that can run a progam when a process exceeds the thresholds you write into the alarm. You can find examples in /opt/perf/examples. You can loop through per-process data scanning for processes that have PROC_CPU_TOTAL_UTIL greater than 80% for 60 minutes. If you do not have GlancePlus Pak, you can install trial software from your application CDs to give it a whirl.
Just keep in mind that alarming on a process running for more than 24 hours may be a little difficult (you would have to specify accumulated CPU time instead of linear start/stop times). Maybe PROC_CPU_TOTAL_TIME_CUM greater than 86400 seconds (24hours of execute time -- you might want a smaller number).
-dlt-