- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Glance file is empty.
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
тАО10-23-2008 05:52 AM
тАО10-23-2008 05:52 AM
I have is scripts run in crontab.
########################################
#!/usr/bin/ksh
fecha=`date | awk '{print $1$2$3$4}`
/opt/perf/bin/glance -f /adm/scripts/glancemonitor$fecha.txt -iterations 1
But the file that generate this scripts is empty. i need help.
Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 06:21 AM
тАО10-23-2008 06:21 AM
SolutionProbably:
No variables are being submitted.
date or awk command are failing because cron jobs have no PATH set.
Set a PATH in your script.
See whence to find PATH
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 06:50 AM
тАО10-23-2008 06:50 AM
Re: Glance file is empty.
But the problem is that file is empty when scripts is finished by cron. all variable are ok, because the file have the date when script finished.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 07:09 AM
тАО10-23-2008 07:09 AM
Re: Glance file is empty.
When you cron a job you dont have an environment.
So when the script executes via cron it will not know where date and awk are located. Thus, the commands will fail.
Try setting a path or explicity call the commands as below
#!/usr/bin/ksh
fecha=`/sbin/date | /usr/bin/awk '{print $1$2$3$4}`
/opt/perf/bin/glance -f /adm/scripts/glancemonitor$fecha.txt -iterations 1
Note the path to the date and awk commands may differ on your system as these paths are from my Tru64 system.
if you don't know the path to the command type:
which date
which awk
It will display where it finds the command...as long as it's in the PATH of the user you're logged in as.
Otherwise use the find command to find where they are.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 07:27 AM
тАО10-23-2008 07:27 AM
Re: Glance file is empty.
-rw-r--r--1 root sys 0 Oct 23 11:20 glancemonitorThuOct2311:20:00.txt
The script look as follow .
fecha=`/usr/bin/date | /usr/bin/awk '{print $1$2$3$4}`
/opt/perf/bin/glance -f /adm/scripts/glancemonitor$fecha.txt -iterations 1
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 07:32 AM
тАО10-23-2008 07:32 AM
Re: Glance file is empty.
Re-direct the error channel to a file!
I assume something like this:
# export TERM=xx
# glance -f /tmp/t1 -iterations 1
Welcome to Glance
Sorry, I don't know anything about your "xx" terminal.
IMHO your result will be similar!
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 07:34 AM
тАО10-23-2008 07:34 AM
Re: Glance file is empty.
man glance
on how to run it in background.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 07:54 AM
тАО10-23-2008 07:54 AM
Re: Glance file is empty.
# glance -f /tmp/t1 -iterations 1 >/tmp/t2
# more /tmp/t2
Sorry, I don't know anything about your "xx" terminal.
Welcome to Glance
You will probably find related massages in
# more /var/adm/cronlog
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 07:58 AM
тАО10-23-2008 07:58 AM
Re: Glance file is empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 08:04 AM
тАО10-23-2008 08:04 AM
Re: Glance file is empty.
-> glance will not run!
See
man glance
on how to run glance without a terminal (in background).
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!