- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: samba monitor script
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
12-01-2005 02:03 AM
12-01-2005 02:03 AM
someone braught down the main samba daemon by accident the other day, so we couldnt do processing. i tried to put a script in cron
to monitor samba n bring it up (which was supplied by itrc, thx. its a good script but i noticed that if i kill the main samba daemon and a client samba daemon is up, the script says samba is up. i then tried it straight from startsmb and it also thinks samba is up! it there a bug here?
thx in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 02:21 AM
12-01-2005 02:21 AM
Re: samba monitor script
How did somone bring it down by accident?
Can you post the script?
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 02:32 AM
12-01-2005 02:32 AM
Re: samba monitor script
# CIFS-Server A.01.11.04 HP CIFS Server (Samba) Fi
le and Print Services
CIFS-Server.CIFS-DOC A.01.11.04 Samba Documentation (orig
inal)
2. someone braught it down by accident and didnt notice
3. #!/usr/bin/ksh
set -o xtrace
if [ -z "`ps -ef |grep -v grep |grep smbd`" ] ;then
/sbin/init.d/samba stop
/sbin/init.d/samba start
elif [ -z "`ps -ef |grep -v grep |grep nmbd`" ] ;then
/sbin/init.d/samba stop
/sbin/init.d/samba start
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 02:56 AM
12-01-2005 02:56 AM
Re: samba monitor script
There is a file which contains the PID of the main smbd daemon
/var/opt/samba/locks/smbd.pid
build a monitor script by the PID from this file and check if the daemon with this PID is running.
As a template take a look at
/opt/samba/HA/samba.mon
Regards
Rainer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 06:15 AM
12-01-2005 06:15 AM
SolutionAs Rainer says, look for the actual pid:
#!/usr/bin/ksh
SMBD=`cat /var/opt/samba/locks/smbd.pid`
NMBD=`cat /var/opt/samba/locks/nmbd.pid`
set -o xtrace
if [ -z "`ps -ef |grep -v grep |grep $SMBD`" ] ;then
/sbin/init.d/samba stop
/sbin/init.d/samba start
elif [ -z "`ps -ef |grep -v grep |grep $NMBD`" ] ;then
/sbin/init.d/samba stop
/sbin/init.d/samba start
fi
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2005 06:34 AM
12-01-2005 06:34 AM
Re: samba monitor script
will test it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2006 04:52 AM
03-28-2006 04:52 AM
Re: samba monitor script
HP CIFS Version A.02.02.01, released 3/27/2006, contains a new utility, smbmonitor. This is a perl script with many options to choose which daemons to monitor, restart them in necessary, collect data, send alert email, etc.
The Release Note at http://docs.hp.com/en/B8725-90102/index.html has a mention of the tool and the CIFS release can be download from the software depot at http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B8725AA