- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cronjob is not run at single user mode.
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
08-21-2008 03:53 PM
08-21-2008 03:53 PM
Cronjob is not run at single user mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 04:11 PM
08-21-2008 04:11 PM
Re: Cronjob is not run at single user mode.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 04:15 PM
08-21-2008 04:15 PM
Re: Cronjob is not run at single user mode.
You don't. At single-user mode, only '/' is mounted. The 'cron' daemon expects '/var/spool/cron/crontabs' to be present (when '/var' is mounted).
Too, the 'cron' daemon is started at run-level-2 which can be deduced by doing:
# ls -l /sbin/rc?.d/*cron*
lrwxr-xr-x 1 root root 17 Mar 3 14:20 /sbin/rc1.d/K270cron -> /sbin/init.d/cron
lrwxr-xr-x 1 root root 17 Mar 3 14:20 /sbin/rc2.d/S730cron -> /sbin/init.d/cron
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 04:27 PM
08-21-2008 04:27 PM
Re: Cronjob is not run at single user mode.
Single-user mode is for maintenance ONLY.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 04:32 PM
08-21-2008 04:32 PM
Re: Cronjob is not run at single user mode.
# who -r
. run-level S Aug 21 17:16 S 1 3
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1572864 324488 1238632 21% /
/dev/vg00/lvol8 5144576 1809536 3309048 35% /var
/dev/vg00/lvol7 3276800 2643864 628072 81% /usr
/dev/vg00/lvol5 7569408 3915224 3625640 52% /opt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 04:39 PM
08-21-2008 04:39 PM
Re: Cronjob is not run at single user mode.
> If we bring machine for multi mode to single mode /var /usr /opt and / are still mounting.
...and HOW did you do this? You din *not* boot into single-user mode, rather you did 'init S', no doubt. Look at the manpages for 'init' to see"
/* begin quote */
Transitioning into run level S from a higher run level does not terminate other system activity and does not result in a "single-user state"; this operation should not be done.
/* end quote */
Rebooot; interact with the IPL and issue 'hpux -is'. *THEN* you will be in single-user mode where nothing but '/' is mounted.
Now, reread, my original post, above.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 09:17 PM
08-21-2008 09:17 PM
Re: Cronjob is not run at single user mode.
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
08-22-2008 10:01 AM
08-22-2008 10:01 AM
Re: Cronjob is not run at single user mode.
We think the best way for this request is schedule a cronjobs to bring machine to single mode and back to multi mode when maintenance is done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 10:07 AM
08-22-2008 10:07 AM
Re: Cronjob is not run at single user mode.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 10:09 AM
08-22-2008 10:09 AM
Re: Cronjob is not run at single user mode.
I would probably do it a little differently.
-stop services to keep users off system.
-do maintenance
-re-start services
(do all of this in run-level 3)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 10:55 AM
08-22-2008 10:55 AM
Re: Cronjob is not run at single user mode.
> We do some maintenance and do not want users to login to the machines to run anything and also do not want to power down the machines
You haven't defined "maintenance" tasks. That said, you might want to look into using the 'NOLOGIN' attribute (or others) of the '/etc/default/security' file to prevent logins during your window.
http://docs.hp.com/en/B3921-60631/security.4.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2008 05:18 PM
08-22-2008 05:18 PM
Re: Cronjob is not run at single user mode.
There is only one way to ch angeto single user mode: reboot, interrupt the boot process and run the hpux -ix command. No disks will be mounted (except / and /stand), no networking, no applications.
As far as maintenance, if all your users login with telnet, rlogin, ssh, etc, you can simply create the file: /etc/nologin and add the NOLOGIN=1 to the file: /etc/default/security -- like this:
echo "NOLOGIN=1" >> /etc/default/security
echo "Maintenance underway" > /etc/nologin
Now, no user can login except root. See the man page for security. To stop cron, use this command:
/sbin/init.d/cron stop
You may need to look at /etc/inittab for other automated processes as well as inetd for network services like ftp.
Bill Hassell, sysadmin