In this stackoverflow thread I found a pretty neat way to do it.
while true ; do nc -l -p 1500 -c 'echo -e "HTTP/1.1 200 OK\n\n $(lsof -a -p $(pgrep myprocname) | wc -l)"'; done
Nice, eh?
Technical stuff, mostly
while true ; do nc -l -p 1500 -c 'echo -e "HTTP/1.1 200 OK\n\n $(lsof -a -p $(pgrep myprocname) | wc -l)"'; done
No hay comentarios:
Publicar un comentario