How to detect disconnected Nextcloud Desktop client?

Do you need it for a script to take action or do you want to only monitor it?

for the latter, simply run

nc-who monitor

and select “[ 2 ] for all

That will show you all clients, including the Desktop Clients sorted per last activity, in an adjustable refresh rate (default 5 seconds).

And if you want a detection to integrate in some script: I published the main sql query to get those data in the same topic, as answer #16


Much and good luck,
ernolf