- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Glance and Date Changing
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
10-25-2004 07:27 PM
10-25-2004 07:27 PM
I have a script as follows:
#!/bin/ksh
file=`date "+%d%m%Y"`
/opt/perf/bin/glance -j 60 -adviser_only -syntax /opt/perf/bin/advfile >> /var/glance_log/$file.log &
Purpose is to capture the data on per date basis.
Issue is that glance is not writing output to new file as the date changed rather it continues to write on the same file.
What's the best way to address this issue.
TIA
Mahesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2004 08:57 PM
10-25-2004 08:57 PM
SolutionIf you want to write more than one file you should do:
file=`date "+%d%m%Y"`
/opt/perf/bin/glance -j 60 -iterations $((24*60 - 1)) -adviser_only -syntax /opt/perf/bin/advfile >>/var/glance_log/$file.log &
starting it at 0:00:00 with cron
you can replace the $((24*60 -1)) by 1439
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2004 08:59 PM
10-25-2004 08:59 PM
Re: Glance and Date Changing
The script starts only once and keep sending the output to $file at the moment glance starts. If you stop the execution of the script and start on different day it will send the output to new file. If your server reboots every day you can use -bootup option of glance, and everything will be find. If it is not a case you should find a way to restart your script, killing your glance process at midnight and starting it again.
Regards,
Borislav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2004 09:06 PM
10-25-2004 09:06 PM
Re: Glance and Date Changing
#!/bin/ksh
while :
do
file=`date "+%d%m%Y"`
/opt/perf/bin/glance -j 60 -adviser_only -syntax /opt/perf/bin/advfile >> /var/glance_log/$file.log &
echo $! > /var/tmp/glanceadv.pid
done
and in a cron
kill $(cat /var/tmp/glanceadv.pid )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2004 09:30 PM
10-25-2004 09:30 PM
Re: Glance and Date Changing
#!/bin/ksh
while :
do
file=`date "+%d%m%Y"`
/opt/perf/bin/glance -j 60 -adviser_only -syntax /opt/perf/bin/advfile >> /var/glance_log/$file.log &
echo $! > /var/tmp/glanceadv.pid
wait
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2004 12:58 AM
10-26-2004 12:58 AM
Re: Glance and Date Changing
I will be using a combination of the solutions provided.
regards
Mahesh