Autoshutdown Disable SMBSTATUS Check

  • Hello,


    i know some users need the check for aktive SMB conections but is there a way to disable this?
    Talking about this:
    Samba connected (reported by smbstatus) -> no shutdown


    Autoshutdown is set to not shutdown if theres and ULDL Rate of more than 50 kB/s.
    Now if someone is watching a movie with the folder open in the background and they fall asleep like in the middle of the movie (*cough* Girlfriend *cough*)
    My NAS should shutdown if the movie is finished so the ULDL Rate is below 50 kB/s but it stays online because of the SMBstatus check.



    greetings
    Haytred

  • You can just remove the ports from the portcheck - (Samba 445)

    OMV 4.x| HP Microserver | 256GB Samsung 830 SSD for system | 4x 2TB in a RAID5
    OMV 4.x| Odroid XU4 | 5TB Data drive | 500GB Backup drive
    OMV 5.x| Raspberry Pi 4 | 6TB Data drive | 500GB SSD drive

  • unfortunately thats not working. it checks Samba regardless of what i put into the portcheck.
    Ive set IP check to 253..254 and portcheck to 999 just to make sure.


    the Portcheck for 445 looks like this Found active connection on port 445 (SMB/CIFS) from 192.168.0.100
    with 999 in ports it wont show anything in the log but the smbstatus will still command the NAS to stay online

  • My system not suspend too, because smbcheck found some active connection on port 445 even if no other computer/ip is connectet to the network.


    I think its a samba/smbcheck bug that locked some file even after the smb connection is gone --> http://forum.ubuntuusers.de/to…s-verhindern-autosuspend/.

  • if autoshutdown detects a connection, then there is a connection. You can check it with netstat -tulpen and smbstatus
    This two commands are used to detect connections

  • Are your PCs conntected from Windows to your server? Windows does not close connections sometimes. So don't blame this script or OMV.


    Never mind! Please post the output of
    smbstatus
    smbstatus -p
    smbstatus -v
    and I'll have a look.
    Thx

  • Have the same or very similar issue from long time with Windows 10

    Below my output,


    General SMB not close connection and keep it forever, because my laptop under 192.168.11.145 not working from long time. So I assume this is SAMBA issue, can you help with configure SAMABA to autodisconnect after some time?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!