- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script
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
02-25-2009 01:34 PM
02-25-2009 01:34 PM
Script
Please give me the instructions to write the script. I want to moniter the how much data is read and write per second for 3 days every hour that report is send to /tmp.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 01:42 PM
02-25-2009 01:42 PM
Re: Script
->Please give me the instructions to write the script.
Use vi?
start with something like
#!/usr/bin/ksh
.
.
.
->I want to moniter the how much data is read and write per second for 3 days every hour that report is send to /tmp.
How much unix do you know? Have you attempted something that we can edit for you?
have a look at
#man iostat
Does this provide the info you need?
This can dump stats every 3 seconds for an hour. If this is kicked off from cron on an hourly basis, outputting to a tmp file. Each hour, when the script is started it should generate a new output file name, based on date and hour number.
Good luck
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 01:47 PM
02-25-2009 01:47 PM
Re: Script
If you have any script please send me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 01:50 PM
02-25-2009 01:50 PM
Re: Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 01:54 PM
02-25-2009 01:54 PM
Re: Script
You could run
FS=/db/tmp/db <- mount point
bdf /$FS then grep or awk out the size.
run this every 3 seconds in a loop and check the size differences. Is that what you are looking for?
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 02:03 PM
02-25-2009 02:03 PM
Re: Script
Put this in a loop:
OLDSIZE=$SIZE
SIZE=$(bdf /tmp | grep -v kbytes | awk '{ print $3 }')
then report OLDSIZE - SIZE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 02:31 PM
02-25-2009 02:31 PM
Re: Script
#!/bin/sh
OLDSIZE=$SIZE
SIZE=$(bdf /tmp | grep -v kbytes | awk '{ print $3 }')
it's not executed. please give me the advice. How to execute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 04:10 PM
02-25-2009 04:10 PM
Re: Script
How can I execute the script per every 3 minutes in cronjab.
How can i give the entry in the crontab file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 04:21 PM
02-25-2009 04:21 PM
Re: Script
echo $OLDSIZE $SIZE
But you will have to do some arithmetic aswell if you want the differences.
cron entry:
0,3,6,9,12,15,18,...,54,57 * * * * /path/script >> /tmp/output
fill in the ... with the other miutes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 04:23 PM
02-25-2009 04:23 PM
Re: Script
to edit the crontab file use
crontab -e
you may need to:
EDITOR=vi
export EDITOR
before the crontab -e depending on what your edit is set to.
Also if you are not running as root, you may need an entry in /etc/cron.allow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2009 04:29 PM
02-25-2009 04:29 PM
Re: Script
-> it's not executed. please give me the advice. How to execute.
once you have created and saved the script, you need to set the execute bits in the permissions.
eg: chmod 700 filename
This will give the file read write and execute permissions for the owner. (-rwx------ permissions)