- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell script execution slow
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
тАО08-05-2004 04:34 PM
тАО08-05-2004 04:34 PM
Shell script execution slow
We have some shell scripts that take about couple of minutes to execute on HP UX 10.20. But the same shell scripts are taking more than 7 minutes to execute HP UX 11.00.
Are there any parameters (shell / kernel) that can affect the execution of time of scripts so much?
If there are how do they need to be configured?
Can there be any other reason for the slow execution of scripts?
The scripts are mainly searching for some log files using find command and looking for messages in those files using grep command.
Any help will be appreciated.
Thank You.
Sanjib.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 04:40 PM
тАО08-05-2004 04:40 PM
Re: Shell script execution slow
If its using the find command then that probably explains the differences in execution time.
The larger the filesystem, the longer the find command will take to run. Try to limit the find to specific directories.
Cheers
Con
- Tags:
- find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 04:41 PM
тАО08-05-2004 04:41 PM
Re: Shell script execution slow
Might be someone can point to new options with 'find' to execute better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 04:46 PM
тАО08-05-2004 04:46 PM
Re: Shell script execution slow
time
It will give the time taken by the script
Shell execution are depends upon the command and their environment and needs. Try to debug what your shell program doing as set -v or set -x (good)
Trace out what it is doing differently there.
Try to use effective logic's to use find / grep . Don't use cat logfile. Directly grep it or use < logfile.
It is good to have your shell script and time performance & debugging difference
Regards
Muthu
- Tags:
- time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 05:02 PM
тАО08-05-2004 05:02 PM
Re: Shell script execution slow
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 06:44 PM
тАО08-05-2004 06:44 PM
Re: Shell script execution slow
If so, try:
find / -fsonly hfs
and find / -fsonly vxfs
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 07:18 PM
тАО08-05-2004 07:18 PM
Re: Shell script execution slow
Certainly the find
Put your logfiles in fixed places and then no find needed over the whole system.
You can even use the ln command to
make 1 directory containing softlinks to all your log directories and only search via the start point with the -follow option
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2004 12:28 AM
тАО08-06-2004 12:28 AM
Re: Shell script execution slow
Thank you for your replies and suggestions.
I do not think we have any issue with the file system because this script is part of the application that we are porting from HP UX 10.20 to HP UX 11.00 and it searches only in specific directories and only for specific files using the find command. The structure of the directory/file system is same on both HP UX 10.20 and HP UX 11.00 systems.
We will use the shell settings (set -x and/or set -v) to check the execution of the script to see if tells us anything.
Thank You.
Sanjib.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2004 01:35 AM
тАО08-06-2004 01:35 AM
Re: Shell script execution slow
Bill Hassell, sysadmin