You can set a time limit for commands on Linux. For instance, you can run the ping/top command for a maximum of 90 seconds.

timeout 90s ping www.cyberciti.biz

timeout 90s htop

Works with ssh too:

timeout 60s ssh user@Box1 -- top

See https://www.cyberciti.biz/faq/linux-run-a-command-with-a-time-limit/ for more info.

Reply to this note

Please Login to reply.

Discussion

No replies yet.