- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script for logging performance monitoring
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
03-07-2003 02:20 AM
03-07-2003 02:20 AM
Script for logging performance monitoring
I need an help to write a script to log to a txt the cpu, disk, network and the memory utilization day by day of an hpux 11.00 server.
Please do not respond me to install some software. I have to use only a script.
Regards...
PSS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 02:47 AM
03-07-2003 02:47 AM
Re: Script for logging performance monitoring
Example
sar -u 10 10 > file.txt
writes 10 times all 10 seconds an output of CPU utilization to file.txt
cronjob:
* * * * * sar -u 1 1 > file.txt
writes every minute the CPU utilization to file.txt
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 02:48 AM
03-07-2003 02:48 AM
Re: Script for logging performance monitoring
Example
sar -u 10 10 > file.txt
writes 10 times all 10 seconds an output of CPU utilization to file.txt
cronjob:
* * * * * sar -u 1 1 >> file.txt
writes every minute the CPU utilization to file.txt
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 02:48 AM
03-07-2003 02:48 AM
Re: Script for logging performance monitoring
here you go
#!/usr/bin/ksh
#Do this
#---------
/bin/rm /tmp/sarlis /tmp/toplis 2>/dev/null
top -d5 -n60 -f /tmp/toplis&
sar -A -o /tmp/sarlis 5 10 >/dev/null 2>&1
#
file=/tmp/sarlis
wait
xx="u d q b w c a y v m"
for f in $xx
do
echo "sar -$f -f $file" >> /tmp/toplis
echo "======================================================================
========" >> /tmp/toplis
sar -$f -f $file >> /tmp/toplis
echo "======================================================================
========" >> /tmp/toplis
done
Or go to
http://www.introcomp.co.uk/examples/index.html
there are plenty of example there
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 02:50 AM
03-07-2003 02:50 AM
Re: Script for logging performance monitoring
The most simple solution is to run commands as "bdf" and "vmstat" from cron and output to a logfile ex:
0,15,30,45 * * * * /usr/bin/vmstat >>/tmp/vmstat_log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 02:52 AM
03-07-2003 02:52 AM
Re: Script for logging performance monitoring
I had to do something similar so cobbled together a quick shell/awk script.
Feel free to pick out anything useful from it.
Cheers
Keely
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2003 03:27 AM
03-07-2003 03:27 AM
Re: Script for logging performance monitoring
Have a look at this thread, you will probably find something useful here.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x836cc1c4ceddd61190050090279cd0f9,00.html
Cheers
K