Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Samba monitoring

Samba monitoring

Scheduled Pinned Locked Moved Support
5 Posts 3 Posters 15.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    N
    Nikk
    wrote on last edited by
    #1

    Hello,

    Is there a way to monitor samba similar to this https://www.netxms.org/forum/configuration/monitoring-ftp-daemon/msg10341/#msg10341 with externalparameter using smbclient //server/service -U user?

    Because with ProcessCount it's not possible to tell whether samba is running or not.

    Regards,
    Nikk

    1 Reply Last reply
    0
    • B
      B
      Borgso
      wrote on last edited by
      #2

      Which distro are you using?

      Ubuntu:

      Samba running:

      user@box:~$ status smbd
      smbd start/running, process 1406
      
      user@box:~$ smbstatus
      Samba version 3.6.3
      PID     Username      Group         Machine
      -------------------------------------------------------------------
      
      Service      pid     machine       Connected at
      -------------------------------------------------------
      share1       2714    client1        Tue Apr  8 20:42:18 2014
      share1       31445  client2        Mon Apr 14 11:17:00 2014
      share2       2714    client3        Tue Apr  8 20:42:18 2014
      share3       2714    client2        Tue Apr  8 20:42:18 2014
      
      Locked files:
      Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
      --------------------------------------------------------------------------------------------------
      31445        1000       DENY_NONE  0x100081    RDONLY     NONE             /srv/user   path/OpenFolder   Mon Apr 21 19:32:00 2014
      

      Samba not running:

      user@box:~$ status smbd
      smbd stop/waiting
      
      user@box:~$ smbstatus
      Samba version 3.6.3
      PID     Username      Group         Machine
      -------------------------------------------------------------------
      
      Service      pid     machine       Connected at
      -------------------------------------------------------
      
      No locked files
      

      If you want to check via ProsessCount, did you try "smbd"?

      user@box:~$ ps aux|grep smbd
      root     15030  0.0  0.2 122504  5756 ?        Ss   15:44   0:00 smbd -F
      root     15031  0.0  0.0 122504  1508 ?        S    15:44   0:00 smbd -F
      user   15032  0.0  0.1 124976  3524 ?        S    15:44   0:00 smbd -F
      
      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        Hi!

        If you have Windows agent somewhere, you can use Net.RemoteShareStatus or Net.RemoteShareStatusText parameter. Syntax is following:

        Net.RemoteShareStatus(share,domain,login,password)
        Net.RemoteShareStatusText(share,domain,login,password)

        Best regards,
        Victor

        1 Reply Last reply
        0
        • N
          N
          Nikk
          wrote on last edited by
          #4

          Thanks for your responses!

          Borgso, i will try smbstatus, but ProcessCount with smbd is faulty, because, there are still many smbd processes running, while samba itself is down. 😕

          Victor, what are the status return codes?

          Using this Net.RemoteShareStatus(share,domain,login,password)
          It shows 0, also when i type incorrect domain, respectively OK for Text.

          1 Reply Last reply
          0
          • V
            V
            Victor Kirhenshtein
            wrote on last edited by
            #5

            Net.RemoteShareStatus should return status code returned by NetUseAdd Windows API call. Level 2 call is used.

            Best regards,
            Victor

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups