我正在尝试启动一个进程,尽管ps-ef|grep myprocessname没有显示它正在运行,但当我调用脚本启动它时,它会显示进程已经在运行,正在退出。
我在网上搜索了大约一个小时,找不到任何答案。有人能帮忙吗?非常感谢。
@TILO:/var/run下没有一个文件的名称甚至接近我的进程。还有其他建议吗?
@VKRAM:这是一个第三方软件。有什么建议吗?
我正在尝试启动一个进程,尽管ps-ef|grep myprocessname没有显示它正在运行,但当我调用脚本启动它时,它会显示进程已经在运行,正在退出。
我在网上搜索了大约一个小时,找不到任何答案。有人能帮忙吗?非常感谢。
@TILO:/var/run下没有一个文件的名称甚至接近我的进程。还有其他建议吗?
@VKRAM:这是一个第三方软件。有什么建议吗?
请在/var/run下检查是否有您试图启动的进程的.pid文件。
例如/var/run/mysqld/mysqld.pid就是这样一个文件。
该文件包含进程的PID。。。
run a ps -edaf | grep PID # with the pid you find in the file
如果找不到进程,可以删除pid文件,然后尝试重新启动进程
尝试在有问题的程序上使用strace:
strace yourprogram
在它终止之前不久,您应该看到它用来确定另一个实例正在运行的系统调用,并且可以从那里对它正在使用的方法进行逆向工程。
你说找不到PID文件。。。
If you can t find the PID file (maybe because some of the directories under /var/run are deeply nested), try this to see a list of all PID-files in there:
find/var/run-type f-name*.pid
find/var/type f-name*.pid
maybe you ll see a filename that looks similar to the process name you re trying to start. Or you can also put a grep at the end of that line and try to grep for the process name in the list.
一些程序也使用锁定文件——这些文件通常可以在/var/lock/或/var/lock/subsystem下找到
If that doesn t help, try to look at the start-script that you re using , e.g. under /etc/init.d/ Look at it in detail and look for something like LOCK_FILE or PID_FILE
For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...
How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks
i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...
Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...
I ve just installed Zend Studio 7.0.2 on my Linux-Ubuntu 9.10 system. There were no problems during the installation but when I try to create a new project, the New Project form hangs when I click ...
I am running valgrind as follows:- /usr/local/bin/valgrind "process_name" After excecution its giving me following error ==21731== ==21731== Warning: Can t execute setuid/setgid executable: ==...
I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...
Is there anything other than DDD that will draw diagrams of my data structures like DDD does that runs on Linux? ddd is okay and runs, just kind of has an old klunky feeling to it, just wanted to ...