How is it possible that kill -9 for a process on Linux has no effect?

As noted in comments to the OP, a process status (STAT) of D indicates that the process is in an “uninterruptible sleep” state. In real-world terms, this generally means that it’s waiting on I/O and can’t/won’t do anything – including dying – until that I/O operation completes. Processes in a D state will normally only … Read more

lsof survival guide [closed]

To show all networking related to a given port: lsof -iTCP -i :port lsof -i :22 To show connections to a specific host, use @host lsof -i@192.168.1.5 Show connections based on the host and the port using @host:port lsof -i@192.168.1.5:22 grepping for LISTEN shows what ports your system is waiting for connections on: lsof -i| … Read more

Calling JMX MBean method from a shell script

The following command line JMX utilities are available: jmxterm – seems to be the most fully featured utility. cmdline-jmxclient – used in the WebArchive project seems very bare bones (and no development since 2006 it looks like) Groovy script and JMX – provides some really powerful JMX functionality but requires groovy and other library setup. … Read more

Best practice to run Linux service as a different user

On Debian we use the start-stop-daemon utility, which handles pid-files, changing the user, putting the daemon into background and much more. I’m not familiar with RedHat, but the daemon utility that you are already using (which is defined in /etc/init.d/functions, btw.) is mentioned everywhere as the equivalent to start-stop-daemon, so either it can also change … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)