- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- hwo to use cron tab
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
тАО05-09-2002 09:35 AM
тАО05-09-2002 09:35 AM
for every 30 minit .
now hwo to to it using n cron tab and swave it in one folder
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2002 09:47 AM
тАО05-09-2002 09:47 AM
Re: hwo to use cron tab
1.log in as root
2.crontab -e
3.add the following line
30 * * * * /usr/bin/netstat -s >> log file
this will update the log file every 30 mts.
4. Please do check the cron bu crontab -l
Also please clean up the log file where the info is stored regularly so that you dont end have 100 % full filesystems.
You can create a shell script to write the time stamp too
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2002 09:48 AM
тАО05-09-2002 09:48 AM
Re: hwo to use cron tab
0, 30 * * * * /usr/bin/netstat -s >> your_filename
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2002 09:54 AM
тАО05-09-2002 09:54 AM
Solutionvi
#/bin/sh
#
#
echo "********************"
echo "Command ran:"date
echo "********************"
netstat -s >> /dirpath/netfile.log
Save the file..
chmod 770
Now edit your existing cronfile and add a line:
crontab -e
00,30 * * * * /dirpath/
The job newfile-name simply runs the command and append the results to file /dirpath/netfile.log.
The entry in your cronfile will run every 30 minutes of every hour of every day of every month....I didn't bother to log any messages in cron.
Rgrds,
Rit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2002 09:56 AM
тАО05-09-2002 09:56 AM
Re: hwo to use cron tab
# crontab -e
===> edit and add this line.
00,30 * * * * { date; netstat -s; } >> /tmp/data
# crontab -l
===> check it