HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script csh not run on crontab!
Operating System - HP-UX
1833758
Members
3070
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-10-2005 03:32 PM
10-10-2005 03:32 PM
Script csh not run on crontab!
A dba_stats.sh script:
#!/bin/csh -f
# Set the current month day and year.
set month=`date +%m`
set day=`date +%d`
set year=`date +%Y`
set hour=`date +%H`
set minute=`date +%M`
set second=`date +%S`
set YMDHMS=$year$month$day$hour$minute$second
set glancetmp = /ccbs2/stats_raw/ccbs2_glance_$YMDHMS.tmp
set glancetxt = /ccbs2/stats_raw/ccbs2_glance_$YMDHMS.txt
set toptmp = /ccbs2/stats_raw/ccbs2_top_$YMDHMS.tmp
set toptxt = /ccbs2/stats_raw/ccbs2_top_$YMDHMS.txt
# Create tmp files
/opt/perf/bin/glance -adviser_only -iterations 2 -j1 -syntax /ccbs2/cron/glance.syntax > $glancetmp
top -d 1 -f $toptmp
# Rename to txt files
mv $glancetmp $glancetxt
mv $toptmp $toptxt
I put this script into crontab and set run every 2 min.
0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /ccbs2/cron/dba_stats.sh
The script have run well for 3 months. But at Oct 6th 2005 08:32:00 it didn't run. vi /var/mail/oss before and after error:
===================== GlancePlus Non-Fatal Error =====================
Version:
User : oss Date: Thu Oct 6 08:32:00
File : /crm/gp/source/glance/glance.c Line: 955
System : COVIS1 B.11.00 9000/800
Unable to perform functions on devices.
======================================================================
===================== GlancePlus Non-Fatal Error =====================
Version: B3692A GlancePlus C.03.55.00
User : oss Date: Thu Oct 6 08:32:04
File : /crm/gp/source/glance/glance.c Line: 978
System : COVIS1 B.11.00 9000/800
Unable to perform functions on devices.
======================================================================
===================== GlancePlus Non-Fatal Error =====================
Version: B3692A GlancePlus C.03.55.00
User : oss Date: Thu Oct 6 08:32:04
File : /crm/gp/source/glance/glance.c Line: 980
System : COVIS1 B.11.00 9000/800
Unable to perform functions on devices.
======================================================================
*************************************************
Cron: The previous message is the standard output
and standard error of one of your crontab commands:
/ccbs2/cron/dba_stats.sh
From oss@COVIS1 Thu Oct 6 03:47:03 EDT 2005
Received: (from oss@localhost) by COVIS1 (8.7.6/8.7.1) id DAA03151 for oss; Thu, 6 Oct 2005 03:47:02 -0400 (EDT)
Date: Thu, 6 Oct 2005 03:47:02 -0400 (EDT)
From: oss@COVIS1
Message-Id: <200510060747.DAA03151@COVIS1>
A copy of an editor buffer of your file "setenv"
was saved when the editor was killed.
This buffer can be retrieved using the "recover" command of the editor.
An easy way to do this is to give the command "ex -r setenv".
This works for "edit" and "vi" also.
From root@COVIS1 Fri Oct 7 12:16:00 TST 2005
Received: (from root@localhost) by COVIS1 (8.7.6/8.7.1) id MAA02670 for oss; Fri, 7 Oct 2005 12:16:00 +0700 (TST)
Date: Fri, 7 Oct 2005 12:16:00 +0700 (TST)
From: root@COVIS1
This script is OK when run manual but not run when put on crontab :(. Please help me!
#!/bin/csh -f
# Set the current month day and year.
set month=`date +%m`
set day=`date +%d`
set year=`date +%Y`
set hour=`date +%H`
set minute=`date +%M`
set second=`date +%S`
set YMDHMS=$year$month$day$hour$minute$second
set glancetmp = /ccbs2/stats_raw/ccbs2_glance_$YMDHMS.tmp
set glancetxt = /ccbs2/stats_raw/ccbs2_glance_$YMDHMS.txt
set toptmp = /ccbs2/stats_raw/ccbs2_top_$YMDHMS.tmp
set toptxt = /ccbs2/stats_raw/ccbs2_top_$YMDHMS.txt
# Create tmp files
/opt/perf/bin/glance -adviser_only -iterations 2 -j1 -syntax /ccbs2/cron/glance.syntax > $glancetmp
top -d 1 -f $toptmp
# Rename to txt files
mv $glancetmp $glancetxt
mv $toptmp $toptxt
I put this script into crontab and set run every 2 min.
0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /ccbs2/cron/dba_stats.sh
The script have run well for 3 months. But at Oct 6th 2005 08:32:00 it didn't run. vi /var/mail/oss before and after error:
===================== GlancePlus Non-Fatal Error =====================
Version:
User : oss Date: Thu Oct 6 08:32:00
File : /crm/gp/source/glance/glance.c Line: 955
System : COVIS1 B.11.00 9000/800
Unable to perform functions on devices.
======================================================================
===================== GlancePlus Non-Fatal Error =====================
Version: B3692A GlancePlus C.03.55.00
User : oss Date: Thu Oct 6 08:32:04
File : /crm/gp/source/glance/glance.c Line: 978
System : COVIS1 B.11.00 9000/800
Unable to perform functions on devices.
======================================================================
===================== GlancePlus Non-Fatal Error =====================
Version: B3692A GlancePlus C.03.55.00
User : oss Date: Thu Oct 6 08:32:04
File : /crm/gp/source/glance/glance.c Line: 980
System : COVIS1 B.11.00 9000/800
Unable to perform functions on devices.
======================================================================
*************************************************
Cron: The previous message is the standard output
and standard error of one of your crontab commands:
/ccbs2/cron/dba_stats.sh
From oss@COVIS1 Thu Oct 6 03:47:03 EDT 2005
Received: (from oss@localhost) by COVIS1 (8.7.6/8.7.1) id DAA03151 for oss; Thu, 6 Oct 2005 03:47:02 -0400 (EDT)
Date: Thu, 6 Oct 2005 03:47:02 -0400 (EDT)
From: oss@COVIS1
Message-Id: <200510060747.DAA03151@COVIS1>
A copy of an editor buffer of your file "setenv"
was saved when the editor was killed.
This buffer can be retrieved using the "recover" command of the editor.
An easy way to do this is to give the command "ex -r setenv".
This works for "edit" and "vi" also.
From root@COVIS1 Fri Oct 7 12:16:00 TST 2005
Received: (from root@localhost) by COVIS1 (8.7.6/8.7.1) id MAA02670 for oss; Fri, 7 Oct 2005 12:16:00 +0700 (TST)
Date: Fri, 7 Oct 2005 12:16:00 +0700 (TST)
From: root@COVIS1
This script is OK when run manual but not run when put on crontab :(. Please help me!
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 03:45 PM
10-10-2005 03:45 PM
Re: Script csh not run on crontab!
Is it running fine now?? did you have problem at the time when this script did not run??
Did you look at syslog.log at around the time when the script did not run?
Did you look at syslog.log at around the time when the script did not run?
There is no substitute to HARDWORK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 05:39 PM
10-10-2005 05:39 PM
Re: Script csh not run on crontab!
The dba_stats.sh script was written for my monitoring program. The monitor program help the people who work on Windows platform (not using X-Windows telnet/ssh HPUX) can collect and monitor the system performance (CPU,DISK I/O,MEMORY,TOP Process, vmstat,iostat, ...). My program have 3 parts:
- 1 or more scripts on HPUX
- 2 clients on Windows:
+ FTP client: transfer data on HPUX to Windows
+ Process client: processing data and put into Database
- Monitoring Program: (monitor.exe) run on any Windows to monitor.
I have just solved this problem by restarting the Windows which FTP program & Process program run on. But I don't know exactly that this is the problem?
- 1 or more scripts on HPUX
- 2 clients on Windows:
+ FTP client: transfer data on HPUX to Windows
+ Process client: processing data and put into Database
- Monitoring Program: (monitor.exe) run on any Windows to monitor.
I have just solved this problem by restarting the Windows which FTP program & Process program run on. But I don't know exactly that this is the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2005 11:42 PM
10-10-2005 11:42 PM
Re: Script csh not run on crontab!
include the -bootup option along with the -advisor_only option and it will take care of these errors.
Best regards,
Oz
Best regards,
Oz
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP