socketwatch(1)
π socketwatch(1) β General Commands Manual, bestie
okay so picture this: it's the General Commands Manual, and the star of the show is socketwatch β a watchdog for network activity. she's giving supervisor energy and honestly? iconic. let's get into it π«Ά
β¨ NAME β¨
socketwatch β run a command under a watchdog for network activity π
πΈ SYNOPSIS πΈ
socketwatch [options] <command> [arguments ...]
π¦ DESCRIPTION π¦
okay so socketwatch runs a command for you and then watches it β specifically it monitors its network activity, and it does that via an LD_PRELOAD library (yes, that's the whole trick, she's sneaky like that π
). and if the command doesn't send or receive any network data for a stretch of time longer than the timeout value? socketwatch kills it. periodt. π
socketwatch exits when the command it started exits. and if socketwatch was the one that killed the command, then socketwatch exits with an error. otherwise β and this is the cute part β socketwatch exits with the command's own exit status. fr fr, she passes it right along π
and now the important one, bestie, don't skip this: the argument -- disables argument parsing for all proceeding arguments. like, for example, socketwatch ls -l will pass -l to socketwatch and run ls, whereas socketwatch -- ls -l will run ls -l. see the difference?? that -- is doing so much work π
π OPTIONS π
-t,--timeoutβ Set the network activity timeout. β° (this is literally the whole personality of the watchdog)-V,--versionβ Display version information. π-?,--helpβ Display a summary of command-line options. π₯Ί asking for help is self care
π LIMITATIONS π
okay, now the fine print β and ngl this part matters, so read it, don't scroll past π
socketwatchdetects network activity only for file descriptors created within the command process and throughsocket(2).socketwatchdetects network activity from only a limited subset of system calls:read(2)andwrite(2).socketwatchmonitors only dynamically-linked system calls.socketwatchdoes not allow the command to fork or create threads.
lowkey the last one is the big vibe check: no forking, no threads, that's just how it is π
π₯ SEE ALSO π₯
socketwatch is part of mswatch(1); mswatch website: http://mswatch.sf.net/ β go say hi to the family π§
π AUTHOR π
Written by Chris Frost <chris@frostnet.net>. π
and that's the whole page, bestie β¨ this was socketwatch(1) from the General Commands Manual β mwah, go watch some sockets, stay hydrated, and remember: no network activity for too long and she will end you π₯π
π¦ where this page comes from
- nixos 26.05: mswatch-unstable 2018-11-21
- nixpkgs unstable: mswatch 1.2.0-unstable-2018-11-21
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms