Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Samba trouble shoot / workaround ? Post 302521386 by Manu.b on Wednesday 11th of May 2011 05:59:27 AM
Old 05-11-2011
Samba trouble shoot / workaround ?

Hello,

I've setup a ubuntu 10.04 server running samba 3.4.7 as domain controler / file server at a customer site, that works great most of the time but I face a random problem. Of course I'm never on the site when the problem occurs, so I cannot investigate in real time.

What happens is that one smb process is taking ~100% cpu time and keep opened files locked. I did not figure out how this occurs, so I would need to setup some higher debugging level in the samba log. However I'm pretty sure the problem is caused by the windows machines running a cad software (Solidworks) that create lots of temporary files that should be deleted when the assembly files are properly closed, however it seems it does not always properly close those files (and moreover the CAD softwares tends to crash regularly accoding to the customer, but nothing to do with samba, same things happens with windows file servers).

So what does it cause on the samba server : the load averrage is 1.0 or above, with one particular smb process using ~100% cpu time, and the process owner is "root" instead of the samba user that opened the files...

So far the only solution is to kill the "hung" process and delete all the messy temp files.

Since I will not be on this site in the near future to investigate this more in details, I was thinking o a script that would monitor the avg load, if the avg load is 1 or above, would try to identify the smb process causing the heavy load (based on owner = "root" and cpu time > threshould value) and kill it (kill -15 and kill -9 if the kill -15 fails after a timeout of lets say 1 minute).

I know the best solution would be to fix the root cause of the problem, but as I said I will not have time to investigate in the near future, so a workaround is needed.

I found various scripts, to monitor the avg load, some to kill a process, but I'm not sure how to properly identify the "hung" smb process. (there could be several of them and the cpu usage is of course depending of other running processes).

By the way if anyone has already faced a similar issue with samba, any advise would be appreciated.

Last edited by Manu.b; 05-11-2011 at 12:35 PM..
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

ldap+samba+gdm trouble

I'm having troubles setting up a client(with Ubuntu 8.10) for a ldap+samba server. I can't authenticate through the client with gdm, the messages I have in /etc/auth.log at the client is Dec 4 14:21:56 myuser-mydesktop gdm: nss_ldap: failed to bind to LDAP server ldap://192.168.0.1: Invalid... (5 Replies)
Discussion started by: capibolso
5 Replies

2. UNIX for Dummies Questions & Answers

Workaround for macros in sftp command

Hi, I've some existing scripts wherein am using ftp + .netrc. I've defined my macros in .netrc file. I want to switch to sftp now but it seems it doesn't support macros and .netrc and it gives "command invalid" error. Is there any other alternative? Note: I don't want help for... (1 Reply)
Discussion started by: ps51517
1 Replies

3. UNIX for Advanced & Expert Users

stuck in CLOSE_WAIT Solaris 10 - Patch and workaround

Solaris 10 Sparc: When you got a connection locking a tcp/port, and the status is CLOSE_WAIT (for ever :wall:), you just use the tcpdrop, to close the connection. This is a OS bug. I wrote the bug id bellow: BUG-ID 6468753 connections stuck in CLOSE_WAIT The patch that's correct the bug:... (0 Replies)
Discussion started by: thiagofborn
0 Replies

4. AIX

cpu used more than 80% how will u trouble shoot?

cpu used more than 80% how will u trouble shoot? (1 Reply)
Discussion started by: ramraj731
1 Replies

5. AIX

memory is more than 80% how will u trouble shoot it?

memory is more than 80% how will u trouble shoot it? (1 Reply)
Discussion started by: ramraj731
1 Replies

6. Programming

Msgget(2) returns 0 - a workaround fix

Greetings: I am posting this because my searches for this problem only came up with two posts and no helpful suggestions. I have a "solution" (read work-around hack) and have not tried yet to find a root cause, and may never because I am busy doing other things (read working to pay the bills). ... (10 Replies)
Discussion started by: mr_bandit
10 Replies
TDBBACKUP(8)															      TDBBACKUP(8)

NAME
tdbbackup - tool for backing up and for validating the integrity of samba .tdb files SYNOPSIS
tdbbackup [-ssuffix] [-v] [-h] DESCRIPTION
This tool is part of the samba(1) suite. tdbbackup is a tool that may be used to backup samba .tdb files. This tool may also be used to verify the integrity of the .tdb files prior to samba startup or during normal operation. If it finds file damage and it finds a prior backup the backup file will be restored. OPTIONS
-h Get help information. -s suffix The -s option allows the adminisistrator to specify a file backup extension. This way it is possible to keep a history of tdb backup files by using a new suffix for each backup. -v The -v will check the database for damages (currupt data) which if detected causes the backup to be restored. COMMANDS
GENERAL INFORMATION The tdbbackup utility can safely be run at any time. It was designed so that it can be used at any time to validate the integrity of tdb files, even during Samba operation. Typical usage for the command will be: tdbbackup [-s suffix] *.tdb Before restarting samba the following command may be run to validate .tdb files: tdbbackup -v [-s suffix] *.tdb Samba .tdb files are stored in various locations, be sure to run backup all .tdb file on the system. Important files includes: o secrets.tdb - usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba. o passdb.tdb - usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba. o *.tdb located in the /usr/local/samba/var directory or on some systems in the /var/cache or /var/lib/samba directories. VERSION
This man page is correct for version 3.0 of the Samba suite. AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. The tdbbackup man page was written by John H Terpstra. TDBBACKUP(8)
All times are GMT -4. The time now is 10:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy