- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: RC Scripts not starting
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
02-22-2005 12:42 AM
02-22-2005 12:42 AM
RC Scripts not starting
I have some scripts which I have created to start pfs_demon and pfsd, but they dont seem to work.
I have a similar script to start up other things and it seems fine at startup.
within the script,under start, I have the following :
/usr/sbin/pfs_mountd &
/usr/sbin/pfsd 4 &
I have also tried using nohup in fornt of it and also without the '&' at the end but to no avail.
Running it manually using S991pfs_mount start seems to work fine but not under the rc3.d scripts .
Any clues as to what I could be missing
Cheers, Aslam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 12:45 AM
02-22-2005 12:45 AM
Re: RC Scripts not starting
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 12:52 AM
02-22-2005 12:52 AM
Re: RC Scripts not starting
I have not linked it I have just put it into the script within /sbin/rc3.d/S991pfs_mount
All executables have full paths, but I dont have any environment variables to be set :
I have copied the script below
#!/sbin/sh
#
PATH=$PATH:/usr/sbin:/usr/bin:/sbin
# Daemons: psf_daemon
#
killproc() { # kill the named process(es)
for x in "$@";do
pid=`ps -e |grep "$x" |sed -e 's/^ *//' -e 's/ .*//'`
[ ! -z "$pid" ] && echo killing $x && kill $pid &
done
}
# return pid of the named process(es)
findproc() {
pid=`ps -e |grep "$1" |sed -e 's/^ *//' -e 's/ .*//'`
echo $pid
}
EXIT_OK=0
EXIT_ERR=1
EXIT_NA=2
case "$1" in
'start_msg')
echo "Starting pfs_mountd"
exit $EXIT_OK
;;
'stop_msg')
echo "Stopping pfs_mountd"
exit $EXIT_OK
;;
'start')
/usr/sbin/pfsd &
/usr/sbin/pfs_mountd &
exit $EXIT_OK
;;
'stop')
killproc pfs_mountd
exit $EXIT_OK
;;
*)
echo "Usage: /sbin/rc3.d/S991pfs_mountd { start | stop }"
exit $EXIT_ERR
;;
esac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 01:07 AM
02-22-2005 01:07 AM
Re: RC Scripts not starting
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 01:10 AM
02-22-2005 01:10 AM
Re: RC Scripts not starting
So I should copy this script to /sbin/init.d directpory and link to it.
I'll try and see.
Thanks again, Aslam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 01:30 AM
02-22-2005 01:30 AM
Re: RC Scripts not starting
copied the file to /sbin/init.d directory, and linked it.
Changing runlevel from 3 to 2 and back again to 3 seems to make it work.
However when rebooting this machine, the script still fails. I cannot seem to find the cause.
Aslam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 01:36 AM
02-22-2005 01:36 AM
Re: RC Scripts not starting
add some debug steps into your code and then check the rc.log file after reboot.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 02:18 AM
02-22-2005 02:18 AM
Re: RC Scripts not starting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 02:29 AM
02-22-2005 02:29 AM
Re: RC Scripts not starting
----------------------------------------------------------
This document from HP explains more about shutdown vs reboot:
When bringing an HP-UX system down, Hewlett Packard recommends using
the shutdown(1M) command instead of the reboot command.
The shutdown(1M) command does additional preprocessing to prepare
the system for the reboot(1M) command. Primarily, shutdown(1M)
executes /sbin/rc to shutdown subsystems, unmount filesystems, and
other tasks to bring the system to run level 0. This process
ensures that the system is as quiet as possible before running the
reboot(1M) command.
The reboot(1M) command will then kill all remaining non-system
processes, sync the buffer cache, and then calls the reboot(2)
system call.
Note that issuing a reboot instead of a shutdown does not attempt
to stop any of the subsystems or unmount the file systems. While
reboot does attempt to kill non-system processes, other system
deamons may be active on the system. For example, the vxfsd
daemon may be attempting to flush the inode cache.
Any remaining activity on the system - when the reboot(2) system
call is made - can cause the system to hang during the reboot if
the activity locks any resource that the reboot(2) system call
needs to complete its processing, especially when reboot is trying
to flush the buffer cache.
Therefore, shutdown(1M) should be used instead of reboot(1M) to
provide a more comprehensive shutdown and limit the possibility of
system hangs during a reboot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 04:00 AM
02-22-2005 04:00 AM
Re: RC Scripts not starting
Sorry I ment I use "shutdown -r -y -o now" to reboot the server.
I think persnally its now the pfs_mountd and the pfsd commands, they have to be started up manually.
I've on a few systems here but none are running this automatically.
Cheers.
Aslam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 04:07 AM
02-22-2005 04:07 AM
Re: RC Scripts not starting
Reading the man pages, just noticed:
"It is recommended that the pfs_mountd daemon be invoked by rc(1M).It must be invoked in the background."
Are running it in the background?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 07:34 PM
02-22-2005 07:34 PM
Re: RC Scripts not starting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 09:43 PM
02-22-2005 09:43 PM
Re: RC Scripts not starting
a) export PATH
b) add nohup before the script.
It now works, thanks to all.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 09:45 PM
02-22-2005 09:45 PM