Why does Plex Media Server's PID keep increasing in "top"? - linux

I've searched first to no avail. When I type:
sudo service plexmediaserver start
and then:
top
I get:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2908 plex 15 -5 149896 17964 9436 D 2.6 0.5 0:00.05 Plex Media+
Then if I run top again I get:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2912 plex 15 -5 149896 17964 9436 D 2.6 0.5 0:00.05 Plex Media+
and so on. If I continue refreshing top the PID of Plexmediaserver keeps increasing. Plex is no longer accessible via a web browser or DLNA enabled device.
I have tried to remove and reinstall with
sudo apt-get remove plexmediaserver
sudo dpkg -i plex*.deb
Any suggestions would be appreciated. Thanks in advance.
-Nick

Thanks, I looked at the error logs and found some reference to sqlite3, googled that, and found a solution over at the plex forums.
mv /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/* ./plexscrewedup
sudo service plexmediaserver stop
sudo service plexmediaserver start
Done! You have to re-add all of your libraries but at least the server is back up and running.

Related

How to kill/stop a process that continuously refreshes its PID?

I recently installed Graylog2 onto my Ubuntu server for log monitoring. I soon after get an alert stating that my CPUs are reaching capacity. I then log into my server over SSH and run top. What I see confuses me and makes it difficult to kill the process.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2462 graylog2 20 0 2103292 42684 16424 S 19.3 1.1 0:00.58 java
2470 graylog+ 20 0 2295612 46368 16032 S 13.0 1.1 0:00.39 java
1971 www-data 20 0 354808 36140 19392 S 10.0 0.9 0:00.61 php5
Everytime top refreshes, I see that the PIDs of graylog have increased so I'm unable to kill it by PID.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16937 www-data 20 0 357988 52140 34244 S 45.3 1.3 0:07.45 php5-fpm
24588 graylog2 20 0 2079236 35464 15576 S 9.7 0.9 0:00.29 java
24547 graylog+ 20 0 2295612 37148 15640 S 8.0 0.9 0:00.24 java
What is the proper way to kill/stop a process that continuously re-instantiates itself like that?
I don't now graylog. But perhaps 'killall' can help you. It handles processes by name.
http://linux.die.net/man/1/killall
Please read the man pages before use it.
i don't use it often. so i don't know the disadvantages. (if there are any)

How to tell if a task is running or dead in ubuntu?

I am running a awk script in Ubuntu terminal. The script works for relatively small size file. So I tried it on a big file and it has been a long time and is still running.
I used top and this is what i got and the %MEM is changing from time to time.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2263 user 20 0 15.1g 12g 372 D 17 90.1 3:56.43 awko
I dont really know if it's dead or should I keep waiting? How can I tell it?

how to use procps-3.2.8 in listing all the running processes?

Does anyone know how to use procps-3.2.8 in listing all the running processes of ubuntu/linux?
And how to kill them using procps-3.2.8?
please provide the step-by-step procedure and provide useful links about procps.
procps is the package which contains the many command line utility provided. You can find the complete information about each utility option under the procpcs from the below location:
On the homepage we can get the following information about procps:
procps is the package that has a bunch of small useful utilities that give information about processes using the /proc filesystem. The
package includes the programs ps, top, vmstat, w, kill, free, slabtop,
and skill.*
http://www.linuxfromscratch.org/lfs/view/7.2/chapter06/procps.html
http://procps.sourceforge.net/
How to use procps-3.2.8 in listing all the running processes?
ps is the part of procps package and there are numerous ways to list the all running process(For detailed information do man ps).
mantosh#mantosh4u:~/practice$ ps -V
procps version 3.2.8
mantosh#mantosh4u:~/practice$ ps -AF
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
root 1 0 0 6143 2544 3 14:38 ? 00:00:00 /sbin/init
root 2 0 0 0 0 1 14:38 ? 00:00:00 [kthreadd]
.............................................................................
root 3320 2 0 0 0 0 15:13 ? 00:00:00 [kworker/u:2]
root 3334 2 0 0 0 1 15:18 ? 00:00:00 [kworker/1:0]
How to kill them using procps-3.2.8?
pkill is part of procps package which contains numerous command line option to kill a process. For detailed information man pkill on your terminal.
mantosh#mantosh4u:~/practice$ pkill -V
pkill (procps version 3.2.8)
mantosh#mantosh4u:~/practice$ pkill -f gedit
In the above example, the gedit was the process name which has been killed.

How to find CPU utilization rate moster file?

I use "top" command and got the result below:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
30769 test 20 0 48964 23m 5968 R 100 1.4 2:06.89 php
30747 test 20 0 48964 23m 5976 R 57 1.4 6:24.55 php
How can I to find which php file use the mostest CPU.
(apologize for my poor english)
Try this:
ps -e -o pid,%cpu,comm= | sort -n -k 2 | grep "\.php"
output will be sorted by processes %CPU usage.

regarding VRT column of top command's output on linux

In the man pages of top command, it is given that VRT column shows memory consumption in kb(kilo bits). When i am running my application in linux, memory consumed is shown as 157m. Does this 157m mean 157 mega bytes or 157 mega bits? Any clarifiction is appreciated.
It's in MegaBytes. Put the output from your top next to the output from ps aux.
> ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 780 72 ? S Jun26 0:09 init [3]
mysql 28670 2.1 42.1 2733944 1708028 ? Sl Sep24 1910:21 /usr/sbin/mysqld
>top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
28670 mysql 15 0 2667m 1.6g 4164 S 104 42.2 1910:37 mysqld

Resources