Killing a CPU process
In Windows machines
If you need to kill a process manually on Windows it’s actually pretty easy. First, fire up a command prompt and type the following command: netstat -a -o -n
To kill the process we need to find the PID of the process in question. I just run down the list by port until I find port 8080 and here you will see the process id was 28344.
Run this from command prompt - not from git bash.
Finally, with the PID we can run the following command to kill the process: taskkill /F /PID 28344
In Linux
Searching for a process by name
Sometimes, we run into issues like process already running
. In those scenarios, we will have to search for the process by name and kill it.
e.g.
ps -efl | grep tomcat
One step process
ps aux | grep tomcat | awk '{print $2}' | xargs kill -9
Using fuser
- This command will print you PID of process bound on that port :
fuser 8080/tcp
- And this command will kill that process :
fuser -k 8080/tcp
Using lsof
List who is using the port
sudo lsof -i -P -n | grep <port number>
And kill the process.
Killing using PID
sudo kill <process id>
kill SIGNAL PID
e.g. kill -9 3827
In MacOS
To identify the PID for a port number
lsof -i :3000
lsof -i tcp:8020
To kill the process using the PID
kill -9 <PID>
Issue with port 80 being blocked
Error using port 80. Do you have another process running on port 80 already?
-
If anyone is running into issues with port 80 blocked while setting up their new slice, I have a workaround.
-
I have an open ticket with VDE support to see about getting the Citrix Virtual Desktop Service changed to a different port.
-
I will let you know when they have verified this fix or have a different workaround.
-
I have been able to successfully reboot my slice several times and log back into the Citrix Workspace with no issue.
-
Verify it is the Citrix Desktop Service running over port 80 by using the following command (as Admin):
netsh http show servicestate | findstr HTTP
-
Run the following command to change its port (you should run netstat -aon to make sure the number you choose is free).
-
Open Services and stop “Citrix Desktop Services”
-
Launch command prompt as administrator
cd C:\Program Files\Citrix\Virtual Desktop Agent\Agent Configuration\ Agentconfig.exe /portnumber:4150
-
Open Services and start “Citrix Desktop Services” again.