Tag Archives: Scripting

Timeout

Timeout for Linux process – Killing or cleanly closing a process in Linux based on timeout / time limit

Timeout on a script or program in Linux is easy!
Did you ever have the need to kill a process if it takes too long to run for any reason? Then this post will show you how you do just that.

This could be used to prevent a cronjob for running too long or prevent cronjobs from overlapping if a lock-file is not the optimal solution in your case.
It could also be used in a case where a process freezes for unknown reasons, and you need to force a restart of it based on a how long it has been running for.

This is not just useful for cronjobs, it can set a timeout on any process, script or program you run!

Continue reading

Fixing /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Today I had to run a script on a 64Bit server, but was met with the following error:

/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Reason for the /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory error

The /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory error will happen only on 64 bit systems, the cause is the that 32 bit libraries are missing from the system and the script/program needs them, so it can’t run.

How to fix the /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory error

Continue reading