- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Running nickel through cron
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-29-2007 06:34 PM
10-29-2007 06:34 PM
Running nickel through cron
CRON ENTRY
---------------------------------------
00 11 * * * su - root -c "/usr/bin/sh /opt/contrib/bin/nickel_out.sh > /dev/null 2>/dev/null"
----------------------------------------
ERROR IN LOGS
--------------------------------------
################################## STARTING NICKEL Mon Oct 29 14:10:00 IST 2007 ##############
process not attached to terminal
Usage: who [-rbtpludAasHTqRm] [am i] [utmp_like_file]
r run level
b boot time
t time changes
p processes other than getty or users
l login processes
u useful information
d dead processes
A accounting information
a all (rbtpludA options)
s short form of who (no time since last output or pid)
H print header
T status of tty (+ writable, - not writable, x exclusive open, ? hung)
q quick who
R print host name
ERROR: The tool is already running under pid: 19416
You must wait until it completes.
###################################### END NICKEL Mon Oct 29 14:10:01 IST 2007 ###################
- Tags:
- cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 07:30 PM
10-29-2007 07:30 PM
Re: Running nickel through cron
cron lackes necessary environment.
Have your script source /etc/profile and .profile for the intended user and most of these issues will probably be resolved.
Or do it manually
Command line
stty -a (make sure that env is duplicated in your script)
env > env.txt
Make sure that environment, especially PATH.
ERROR: The tool is already running under pid: 19416
Make sure the tool is only running once. It seems to object to being run twice.
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-29-2007 07:54 PM
10-29-2007 07:54 PM
Re: Running nickel through cron
ERROR: The tool is already running under pid: 19416
>>>
Never found no tool running at that time when my cron ( nickel) runs, I checked the using.
#ps -aef|grep
#ps -aef|grep -i nickel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 11:55 PM
10-29-2007 11:55 PM
Re: Running nickel through cron
I suspect, that the last error shown
>>
ERROR: The tool is already running under pid: 19416
<<
is a followup caused by the error at startup.
- Why do you use a
su - root -c "..."
as a cron command?
The crontab entry done by user 'root', so no 'su' is required.
- The errors
>>
process not attached to terminal
Usage: who [-rbtpludAasHTqRm] [am i] [utmp_like_file]
<<
are for sure caused by sourcing .profile via "su - ...".
For this I recommend to transfer the setup of the environment needed for running nickel in a seperate file - e.g. /var/opt/nickelrc and sourcing that in .profile as well as in the crontab entry.
Then you could modify your crontab entry to
00 11 * * * . /var/opt/nickelrc;/opt/contrib/bin/nickel_out.sh >/dev/null 2>&1
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 12:31 AM
10-30-2007 12:31 AM
Re: Running nickel through cron
When a command is executed via cron, there is no tty or pty terminal associated with the process. so you may try excecuting it with su without "-" option, set the enviroment for the cron manually as SEP said:
env > env.txt
Anshumali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 12:35 AM
10-30-2007 12:35 AM
Re: Running nickel through cron
VEL,Mum :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2007 02:00 AM
10-30-2007 02:00 AM
Re: Running nickel through cron
I am not e-mailing the nickel output but the logs only to confirm if my nickel created successfully or not. So 10MB limitation :) is taken care.
Thanks,