script runs every second

how do you know scripts runs every second, can anyone explain

@shifu0xd said:

how do you know scripts runs every second, can anyone explain

There are a few ways. Linux has an awful lot of options that allow admins/users to set things the way they want them. This means you need a lot of ways to look for things.

  • cron often shows the scheduled tasks
  • ps shows running processes, you can check this for timers etc., or run it every few seconds and see.
  • Enumeration tools like Pspy/Pspy64 show running events

Type your comment> @TazWake said:

@shifu0xd said:

how do you know scripts runs every second, can anyone explain

There are a few ways. Linux has an awful lot of options that allow admins/users to set things the way they want them. This means you need a lot of ways to look for things.

  • cron often shows the scheduled tasks
  • ps shows running processes, you can check this for timers etc., or run it every few seconds and see.
  • Enumeration tools like Pspy/Pspy64 show running events

OK Thank you so much.

watch is also a useful base utility for when you want something a bit more ad-hoc. So for example you can do “watch -n 5 ps aux” to print out all the running processes every five seconds.

Type your comment> @IAmBecomeDeath said:

watch is also a useful base utility for when you want something a bit more ad-hoc. So for example you can do “watch -n 5 ps aux” to print out all the running processes every five seconds.

Thank you