- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cron script hogging cpu
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
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
тАО09-01-2016 10:22 PM
тАО09-01-2016 10:22 PM
Hi,
We have scron scripts in cron which application users call their profile and execute some scripts.
What we have observed is that for one host when its running its shoots sys% to 75% in top.
What could be the reason ?
Script is shown below:
#!/bin/ksh
trap "" 1 2 3 15
set -e
REALNAME=`id | cut -d"(" -f2 | cut -d")" -f1`
exit_value=1
if [ -r /nos/ure/$1 ] ; then
for i in `cat /nos/ure/$1`
do
if [ "$i" = "$REALNAME" ] ; then
exit_value=0
break
fi
done
fi
exit $exit_value
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2016 06:14 AM
тАО09-02-2016 06:14 AM
Re: Cron script hogging cpu
> What could be the reason ?
I don't know. Almost anything? What's "$1"? What's in
"/nos/ure/$1"? What happens when you run the script interactively on
these systems? (You can test your script on your systems in your
environment more easily than anyone here can.)
> [...] users call their profile [...]
Do all users have see the same behavior? What's in "their profile"?
Is the script causing the problem, or is "their profile" causing it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2016 09:02 PM