Jump to content

How can I discover current connections to server?


Recommended Posts

I'm having an issue with both my main UnRaid and my backup test box where a single disk seems to be experiencing constant read access.

 

I've recently populated each of the affected disks with backup data including a large number of photos.

 

My assumption is that some kind of spotlight index or other index caching is going on by 1 or more machines on my network.

 

Is there a command line way to quickly see what current connections are active on my server and reading (or writing) data?

 

Thanks,

 

Mark.

Link to comment

You can use the 'lsof' command to find out what files are open.

 

That looks like it will be just the thing.  I do have a lot of open files, but I've discovered that on both machines the disks being accessed contain backups of Macs and it is a Mac that appears to be the only machine connected using

 

netstat -an | grep ESTABLISHED

 

Which is the command I discovered on a Linux forums.

 

Thanks :)

Link to comment

using Grep (something I don't really understand how to work correctly)

 

with:- lsof | grep disk

 

cache_dir  1404       root  cwd       DIR        9,1      336          2 /mnt/disk1
cache_dir  1405       root  cwd       DIR       9,10      224          2 /mnt/disk10
cache_dir  1406       root  cwd       DIR        9,2      152          2 /mnt/disk2
cache_dir  1407       root  cwd       DIR        9,3      128          2 /mnt/disk3
cache_dir  1408       root  cwd       DIR        9,4      368          2 /mnt/disk4
cache_dir  1409       root  cwd       DIR        9,5      160          2 /mnt/disk5
cache_dir  1410       root  cwd       DIR        9,6      152          2 /mnt/disk6
cache_dir  1411       root  cwd       DIR        9,7      288          2 /mnt/disk7
cache_dir  1412       root  cwd       DIR        9,8      104          2 /mnt/disk8
cache_dir  1413       root  cwd       DIR        9,9      232          2 /mnt/disk9
find       2431       root  cwd       DIR        9,1   285168      56315 /mnt/disk1/backup/2009-06-22 Old TimeMachine/Xxxxxxxx’s iMac_001ec21b47a8.sparsebundle/bands
sleep      3153       root  cwd       DIR        9,9      232          2 /mnt/disk9
sleep      3155       root  cwd       DIR        9,8      104          2 /mnt/disk8
sleep      3157       root  cwd       DIR        9,2      152          2 /mnt/disk2
sleep      3159       root  cwd       DIR        9,5      160          2 /mnt/disk5
sleep      3161       root  cwd       DIR        9,6      152          2 /mnt/disk6
sleep      3163       root  cwd       DIR        9,3      128          2 /mnt/disk3
sleep      3165       root  cwd       DIR        9,7      288          2 /mnt/disk7
sleep      3167       root  cwd       DIR        9,1      336          2 /mnt/disk1
sleep      3169       root  cwd       DIR       9,10      224          2 /mnt/disk10
sleep      3171       root  cwd       DIR        9,4      368          2 /mnt/disk4
smbd      30698     nobody  cwd       DIR        9,1      336          2 /mnt/disk1
smbd      30698     nobody   33r      DIR        9,1      336          2 /mnt/disk1
smbd      30698     nobody   38r      DIR        9,1      136         18 /mnt/disk1/backup/Xxxxxx's Macbook

 

Those last 3 lines are SMB connections to disk1?  That is the disk that is current constantly reading.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...