- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need a script to get load
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
тАО06-15-2004 10:52 PM
тАО06-15-2004 10:52 PM
Need a script to get load
What I want is to just filter out the load numbers and paste that into a certain spot in an html file.
Is there a way I can do this?
Derek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:01 PM
тАО06-15-2004 11:01 PM
Re: Need a script to get load
Is this what you are looking for:
#!/usr/bin/ksh
while true
do
echo `w -u' >> filename
sleep 300
done
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:02 PM
тАО06-15-2004 11:02 PM
Re: Need a script to get load
echo `w -u' >> filename
This line has back quotes `w -u`
regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:03 PM
тАО06-15-2004 11:03 PM
Re: Need a script to get load
$LOAD=`uptime | cut -c45- | sed "s/,//g"`
- Tags:
- uptime
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:08 PM
тАО06-15-2004 11:08 PM
Re: Need a script to get load
That is almost there, it is cuttin the word Load off before average. what can we do to keep that there?
Derek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:11 PM
тАО06-15-2004 11:11 PM
Re: Need a script to get load
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 11:20 PM
тАО06-15-2004 11:20 PM
Re: Need a script to get load
Thanks to both of you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2004 12:34 AM
тАО06-16-2004 12:34 AM
Re: Need a script to get load
uptime | awk '{print $10, $11, $12}' |sed s/,//g
Rgds...Geoff
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2004 01:37 AM
тАО06-16-2004 01:37 AM
Re: Need a script to get load
Bill Hassell, sysadmin
- Tags:
- cut
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 12:25 AM
тАО06-17-2004 12:25 AM
Re: Need a script to get load
Just use awk to strip the fields you need, you can use head or tail to remove the header information.