Once I've started tensorboard server with the command
tensorboard --logdir=path/to/logdir
is there a command that explicitly close it or can I just kill it without any harm?
Thanks
In my case, CTRL+C doesn't work. The following works for me:
CTRL+Z halts the on-going TensorBoard process.
Check the id of this halted process by typing in the terminal
jobs -l
kill this process, otherwise you can't restart TensorBoard with the default port 6006 (of course, you can change the port with --port=xxxx)
kill -9 #PROCESS_ID
You can kill it without any harm! TensorBoard simply reads your log files and generates visualizations based on them in memory, so you don't need to worry about file corruption, etc.
This command will find the tensorbroad process and terminate it:
kill $(ps -e | grep 'tensorboard' | awk '{print $1}')
I solved this problem by this way - (actually in my ssh, sometimes CTRL+C don't work properly. Then I use this)
Get the running tensorboard process details
ps -ef|grep tensorboard
Sample Output: uzzal_x+ 4585 4413 0 02:46 pts/4 00:00:01 bin/python /bin/tensorboard --logdir=runs/
Kill the process using pid (process id)
kill -9 <pid>
first number 4585 is my current pid for tensorflow
There is a shortcut that is more drastic than CTRL+C:
Try CTRL+\
You can write this:
ps -ef | grep port_number
Get the port number of the tensorboard, then use:
kill -9 PortNumber
On windows, use: taskkill /F /PID <pid> where <pid> is the process ID.
Related
I'm using TestCafe to test an app I'm working on. Today, when I went to run a TC test, I got the following message:
Error: listen EADDRINUSE: address already in use :::57664
I can usually handle these pretty easily: I issue the command:
lsof -i -P | grep -i "listen"
or
lsof -i tcp:57664
and then kill the offending task that is identified.
However, in this case, that port number isn't listed so I don't know which task to kill. also,
ps aux | grep -i "TestCafe"
doesn't show anything helpful.
Any suggestions on how to identify the hung task and kill it?
I tryied command from older versions, but it dont seems to work.
curl "http://localhost:5555/selenium-server/driver/?cmd=shutDownSeleniumServer"
'Old' command is not working because it's part of selenium RC which is not included in selenium 3.
You should now start your nodes with -servlet org.openqa.grid.web.servlet.LifecycleServlet included, and than you can shut it down with http://yourNodeIP:port/extra/LifecycleServlet?action=shutdown
I reported this issue few months ago and it's solved so you can check it out for more details here. https://github.com/SeleniumHQ/selenium/issues/2982
If you are on linux you can kill the process running on that port by
fuser -k 5555/tcp
or netstat -plten |grep java you will get the PID of seleniumserver process.
kill -9 PID.
Also try hitting the lifecycle of selenium grid2
http://yourHubIP:port/lifecycle-manager?action=shutdown
CTRL+c from your terminal also would help.
let me know if you are looking for anything else
Assuming you are running it on *nix and the standalone server is listening on the default port (4444)... you need to:
find the PID of the process that is bound to port 4444 (use lsof command)
send that process a SIGTERM to gracefully shutdown (use the kill command)
you can achieve this with the following one-liner:
$ lsof -t -i :4444 | xargs kill
There is the process named flask I can't kill either with
kill -9 PID #(PID found from ps aux | grep flask)
or with
killall -9 flask
it always respawns with higher PID
this command may be useful for you. But be careful, this command will kill all python processes.
pkill python3
I have fooinit.rt process launched at boot (/etc/init.d/boot.local)
Here is boot.local file
...
/bin/fooinit.rt &
...
I create an order list at job in order to kill fooinit.rt. that is Triggered in C code
and I wrote a stop script (in)which kill -9 pidof fooinit.rt is written
Here is stop script
#!/bin/sh
proc_file="/tmp/gdg_list$$"
ps -ef | grep $USER > $proc_file
echo "Stop script is invoked!!"
suff=".rt"
pid=`fgrep "$suff" $proc_file | awk '{print $2}'`
echo "pid is '$pid'"
rm $proc_file
When at job timer expires 'kill -9 pid'( of fooinit.rt) command can not terminate fooinit.rt process!!
I checked pid number printed and the sentence "Stop script is invoked!!" is Ok !
Here is "at" job command in C code (I verified that the stop scriptis is called after 1 min later)
...
case 708: /* There is a trigger signal here*/
{
result = APP_RES_PRG_OK;
system("echo '/sbin/stop' | at now + 1 min");
}
...
On the other hand, It works properly in case launching fooinit.rt manually from shell as a ordinary command. (not from /etc/init.d/boot.local). So kill -9 work and terminates fooinit.rt process
Do you have any idea why kill -9 can not terminate foo.rt process if it is launched from /etc/init.d/boot.local
Your solution is built around a race condition. There is no guarantee it will kill the right process (an unknowable amount of time can pass between the ps call and the attempt to make use of the pid), plus it's also vulnerable to a tmp exploit: someone could create a few thousand symlinks under /tmp called "gdg_list[1-32767]" that point to /etc/shadow and your script would overwrite /etc/shadow if it runs as root.
Another potential problem is the setting of $USER -- have you made sure it's correct? Your at job will be called as the user your C program runs as, which may not be the same user your fooinit.rt runs as.
Also, your script doesn't include a kill command at all.
A much cleaner way of doing this would be to run your fooinit.rt under some process supervisor like runit and use runit to shut it down when it's no longer needed. That avoids the pid bingo as well as the /tmp attack vector.
But even using pkill -u username -f fooinit.rt would be less racy than the script you provided.
help me resolve this error in apache
/etc/init.d/apache2 restart
error:
There are processes named 'apache2' running which do not match your pid file which are left untouched in the name of safety, Please review the situation by hand.
thanks
Kill them.
kill -9 $(ps -e | grep apache2 | awk '{print $1}')
Before killing the process, maybe, you would like to check if the pid file path set in
/etc/apache2/apache2.conf
equals the one stated in APACHE_PID_FILE environment variable exported in the :
/etc/apache2/envvars
file.
Saving a process snapshot before proceeding to kill, would be helpful :
# top -b -n1 > /tmp/process.log
Then get the pid of apache2 with :
pidof apache2
It output the related processes id(s) e.g 4920 4919. Then kill them with :
sudo kill -9 pid
replacing pid with the process id(s) you got from the previous output.
Finally restart Apache 2 server :
sudo /etc/init.d/apache2 restart
Next time would be helpful letting others know basic things about your OS distro etc.
Hope it helps someone.
none of these answers worked.. this did
kill -9 $(pidof apache2)