Questions tagged [pid]

Process Identifier (PID)

Filter by
Sorted by
Tagged with
1 vote
1 answer
477 views

Interpreting OOM killer logs when triggered on a Java thread

When Linux OOM Killer interrupts a process, the kernel logs usually provide enough information about the culprit's memory consumption (even it is not killed eventually). For example, when snmpd ...
Toparvion's user avatar
  • 113
0 votes
0 answers
38 views

fuser not listing the process even netstat and lsof list

hostserver:~# lsof | grep *:6343 sflowtool 979324 root 3u IPv6 1443815323 0t0 UDP *:6343 hostserver:~# netstat -ntlup | grep 6343 udp6 0 ...
Ujjwal Gupta's user avatar
2 votes
1 answer
566 views

PS Stop-Process fails to stop a subprocess launched from cmd.exe

Preface: I've boiled down a problem I'm having to this simple reproduction, which admittedly looks pretty strange out of context. From powershell (PS), if I use Start-Process to start notepad and ...
cod3monk3y's user avatar
0 votes
2 answers
2k views

How to get PID of an EXE file from Windows command line

How do I get the PID of an EXE file from Windows command line? I want to query the PID from the command line, rather than manually search in Task Manager. I've found something similar in nix
Ivan Santana's user avatar
1 vote
0 answers
2k views

dovecot: can't open pid file

im new here :) after 2 days of googling and trying whatever i could I can't get rid of this: systemd[1]: Can't open PID file /var/run/dovecot/master.pid (yet?) no such file or directory i found info ...
slowpoke's user avatar
0 votes
1 answer
602 views

Why does monit complain about not being able to read the pid file?

I'm nrew to monit and have a question regarding the pid files: I have added the following to my /etc/monit/monitrc: cat /etc/monit/monitrc set daemon 30 set logfile /var/log/monit.log set idfile /var/...
BitFreak's user avatar
  • 103
0 votes
0 answers
168 views

How do I find the ProtonMail Bridge PID file on my server?

I installed Monit on my server, as well as the "ProtonMail Bridge". I followed the following tutorial : https://pychao.com/2020/06/10/update-on-using-protonmail-bridge-on-headless-wordpress-...
Mathieu's user avatar
  • 45
0 votes
2 answers
110 views

How do I locate a service on my server?

I installed Monit on my server, as well as the "ProtonMail Bridge". How to know the path of the "ProtonMail Bridge" service to add it to Monit ? ubuntu@www-example-com ~ $ ps -ef ...
Mathieu's user avatar
  • 45
0 votes
1 answer
59 views

Structure to track running/completed scripts in proc/

I have a script that runs every hour, and without using a database, I would like to check if that file is either: (1) currently running; (2) already completed; or (3) not yet run. If it's #3, then I ...
samuelbrody1249's user avatar
1 vote
0 answers
1k views

PostgreSQL 9.5 not listening; cluster is down; "too many levels of symbolic links"

I'm working on a remote VPS running Ubuntu 16.04 LTS. After a software update (apt upgrade) in which postgresql-common was updated, my PostgreSQL 9.5 server stopped listening on any port. # All ...
Arthur's user avatar
  • 111
5 votes
2 answers
19k views

Can I kill apt.system.daily to fix the apt install command?

When I try to install anything (Ubuntu 16.04) with apt or apt-get I get this: E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the ...
CzipO2's user avatar
  • 157
0 votes
2 answers
886 views

How to get pid of a process that runs quickly

I'm on a CentOS 6 system. I'd like to know the pid of a curl command I'm running. Usually to get the pid of a process I use ps or pidof or pgrep or the like. But I generally use those for long ...
firebush's user avatar
  • 141
0 votes
1 answer
3k views

When ssh to remote host, how can I know the bash pid running on remote host?

When I ssh to a remote host, Is it possible that I get the remote bash pid in my local machine? or vice versa? for example on local terminal, I simply do ssh and keep connection to run my tasks: ssh ...
donkey1120's user avatar
0 votes
1 answer
2k views

Kill ssh process

I was connected to an ubuntu machine and instead of typing exit to logout, I killed the ssh process by its PID: kill PID Now, when I try to connect again to the ubuntu machine, I get the following ...
ARR's user avatar
  • 11
0 votes
2 answers
272 views

Using /dev/shm folder for pid files on RHEL6/CentOS6?

RHEL7/CentOS7 has a dedicated folder: $XDG_RUNTIME_DIR (e.g. /run/user/1000) for pid files, that folder is a tmpfs. However RHEL6/CentOS6 does not have $XDG_RUNTIME_DIR. RHEL6(also RHEL7) has a ...
Boying's user avatar
  • 103
0 votes
1 answer
2k views

get process id of openvpn client in bash script

In a bash script I am starting openvpn as a client like this: #!/bin/bash conf_file=/etc/openvpn/blahblah.conf openvpn_pid_file="/var/run/openvpn-client/ovpnc.pid" command_line="/usr/bin/openvpn --...
MountainX's user avatar
  • 701
0 votes
2 answers
882 views

Saving PID as part of the filename of nohup's output file

I want to save the PID of a nohup process as part of the name of nohup's generated output file. This is going in the right direction, but only works if the process with it's ID is already settled, i....
colidyre's user avatar
  • 137
1 vote
2 answers
745 views

How to find the port used by sshd for a port bind without sudo?

To remove a given port bind the pid can be found with sudo netstat -lnpt and then removed with kill pid. As the process name is known (sshd) the non sudoer user who started it may found the pid with : ...
hello world's user avatar
0 votes
1 answer
516 views

Kill an application knowing its name and command line arguments

If I run a single instance of an application I can kill it via "kill my_app_name" without having to find out what its PID is. But when I'm running multiple instances of the same application with ...
Raj's user avatar
  • 129
0 votes
3 answers
9k views

Linux: how to detect death of a process? [closed]

I would like to detect that a certain process in linux have died. Say that pid of that process is 1234. I can check that its pid is in use by testing the existence of /proc/1234/. Still, it is ...
Grzegorz Gutowski's user avatar
1 vote
2 answers
3k views

How do I get the PID of a conhost process associated with the batch file and cmd process that created it?

Say I have several conhost processes that happen to be running already. Now I run a batch file, which starts a cmd process which, in turn, causes another conhost process to open up. From within the ...
timothyjb's user avatar
1 vote
1 answer
6k views

Why is /run/nginx.pid disappearing? simply disappears from the system everyday?

IMPORTANT NOTE: I no longer need to restart the servers(my 3 VPS!) to have the pid file back in the dir /run/nginx.pid I just typed the command: sudo fuser -k 443 / tcp && service nginx start ...
Ariane Martins Gomes Do Rego's user avatar
1 vote
1 answer
567 views

tcpdump - how to track the source of requests made with ephemeral/dynamic ports

I'm trying to identify the network traffic between multiple backend microservices running on the same server. (they make some rest http calls to each other) Unfortunately, when i use tcpdump, the ...
MikaelW's user avatar
  • 111
1 vote
2 answers
582 views

How to get last PID when last process spawned a child and exited?

I start ssh -S mysocket example.com to connect example.com. If my connection hangs, I need to kill that process: ssh -S mysocket example.com -N -L 1234:localhost:1234 & last_pid=$! ...(do ...
ceremcem's user avatar
  • 218
9 votes
3 answers
18k views

Getting PID from lsof list

I have a react-native application and I want to write a script for start test version. I need to shotdown the :8081 port if it is alive. The command: lsof -i :8081 kill -9 <PID> The lsof ...
PumpkinSeed's user avatar
0 votes
1 answer
192 views

Different pid between NodeManager Managed Server and Java Process

On our Weblogic server, when the server goes OOM, the hprof file is generated with a pid java_pidA.hprof but there is another message from the Node Manager that says managed server ManagedServer_1 ...
Chinmoy's user avatar
  • 101
0 votes
1 answer
1k views

How to make logger log PID on CentOS7

i found documentation for logger stating one can use --id=$$ to log the pid of the calling script. unfortunatly this is not working with logger in centos7. what is the proper way of logging pid to ...
user3347114's user avatar
1 vote
1 answer
397 views

Kill (close) reliability monitor windows by PID powershell

I am trying create a process of the windows reliability monitor and kill it after I take a screenshot. I am having trouble to get the process and automatically close it before I take the screenshot ...
kimo pryvt's user avatar
14 votes
3 answers
31k views

Systemd drop-in fails to create PID file

I have a drop-in for systemd-machined at the path /etc/systemd/system/systemd-machined.service.d/10-machined-pid-file.conf. when I run systemctl status systemd-machined I do see the lines Drop-In: /...
Christian Grabowski's user avatar
0 votes
1 answer
64 views

How can I get su screen PID on Debian8?

I want to run this command by another user (so with su): screen -ALmdS server_mta ./mta-server -n It's okay: su - server_2 -c 'screen -ALmdS server_mta ./mta-server -n But I need the PID of screen, ...
Maróthy Zsolt's user avatar
1 vote
1 answer
2k views

Process changes its PID every second

Today I saw that one process (.NET Runtime Service - mscorsvw.exe) changes its PID really often. When Task Manager refreshes the PID of that process, it is always different. Is that normal? An ...
Redeil's user avatar
  • 13
0 votes
1 answer
512 views

How to identify if a process is unique vs a coincidental same PID?

Having the ability to identify a PID for a process, let's say HTTPD for example, how can I determine later on, on that same server, if that PID/Process is still the original one ? For instance, I ...
GPATA's user avatar
  • 3
3 votes
2 answers
2k views

systemd, logrotate and PID-files

I'm packaging some daemon for debian 8 and systemd. The daemon can create PID-file by itself, but it has no permissions to write into /run because of non-root user. It used to create PID-file via old ...
Paul K.'s user avatar
  • 125
1 vote
1 answer
947 views

zombie lxc swap file: text file busy but no pid

I have a server running Ubuntu 12.04.5 LTS (Precise Pangolin). On that server I created a new Linux container: $ sudo lxc-create -n mycontainer After a while I decided to get rid of this container: ...
igal's user avatar
  • 144
5 votes
2 answers
15k views

How properly handle deletion of pid.file in service script

I'm trying to write service script for application. So I can control it like this: ./myscript.sh start|stop|status On startup pid.file with process id creates, and based on it I can check status and ...
zella's user avatar
  • 153
-1 votes
1 answer
1k views

pidof service doesn't exist

I am trying to set init.d script for some service - let it be uptime that is located in /usr/bin/uptime. Here is my script: #!/bin/bash # description: read service #Source function library . /etc/rc....
fuser's user avatar
  • 113
2 votes
2 answers
850 views

Clustered cron with one server only overlap allowed

I've setuped load balancers: lb1 (active) and lb2 (passive), Glustered web servers: web1 (active), web2 (backup), and some clustered database. Both web servers and databases are A pointed to the VIP ...
Gabriel Santos's user avatar
-2 votes
2 answers
1k views

How to run a program in a new PID namespace

How to run a program in a new PID namespace? All tutorials on the internet show writing some custom C code in order to do it. Is there a command instead for that?
Ivan's user avatar
  • 179
4 votes
3 answers
19k views

Apache Failure on Centos 7 not starting

hellau everyone, i have a problem, that i cant resolve alone, so i need your help. i have installed on a centos 7 apache when im asking for the status of the service (systemctl status httpd) so i ...
Mira Mira's user avatar
  • 141
1 vote
1 answer
2k views

RamMap shows millions of processes that Task manager doesn't

I have a server 2008 box with 32GB RAM on and i have been investigating why it runs out of memory every 150 ish days. Task manager shows that we are running at 99% memory usage but all the processes ...
Display Name's user avatar
2 votes
0 answers
82 views

When is a pid needed in log rotation?

I've read that providing pid in the newsyslog.conf is to ensure that the process writes in the new log file. However, I've tried log rotation without providing a pid because I couldn't find one for ...
rhee's user avatar
  • 41
2 votes
1 answer
315 views

Ubuntu: Postfix and Cyrus expecting saslauthd PID file in different locations

I'm running postfix and cyrus in parallel on my server, as far as I understand this is a quite common think to do. Both daemons use sasl authorization. However, postfix is looking for the saslauthd ...
Stefan's user avatar
  • 21
0 votes
3 answers
65 views

Log pid than cpu higher than a value

I'm looking for a way to log the pid of process higher than a fixed value of cpu (ex 40%). I tried with command like this : ps -eo pcpu,pid,user,args | sort -k 1,2 -r | head -10 But, first, it sorts ...
VinceCore's user avatar
0 votes
1 answer
1k views

Where to create an AF_LOCAL/AF_UNIX socket file when not allowed to write in /var/run?

FSH says that socket and pid files should go to /var/run However, for security purpose, only root can creates file and subdirectories in this location. A common solution is creating a subdirectory ...
hl037_'s user avatar
  • 267
36 votes
4 answers
35k views

Given a PID on Windows - how do I find the command line instruction that executed it?

On a database, I can get a list of all the currently running processes, and the sql command that kicked them off. I'd like to do a similar thing on a windows box. I can get the list of processes, ...
Hawkeye's user avatar
  • 2,729
1 vote
5 answers
4k views

Get the pid if 2 tomcat(s) is running

I have 2 tomcat's running, how do I get the pid if both have similar names? ps -ef | grep java root 12952 1 0 10:01 pts/0 00:00:03 /usr/lib/jvm/jre/bin/java -Djava.util.logging.config....
user3789893's user avatar
3 votes
2 answers
2k views

Reduce PID_MAX Safely

I have one server in a cluster that was experiencing a process table leak. Because the developer responsible for the code was unavailable for a few days I increased pid_max on the machine as follows: ...
vastlysuperiorman's user avatar
6 votes
2 answers
11k views

Is it normal for PID's to be over 65535?

I have a managed VPS running on CloudLinux 6.6 x86_64 standard. It has a few websites with MySQL, PHP and Apache running with CPanel. I am working on a PHP system that needs to manage a PID and ...
Ismael Miguel's user avatar
2 votes
2 answers
6k views

screen command process id

First of all sorry for my bad english and i am new at linux. When i do this, it can write process id to pid file start () { echo -n "Starting someserver.jar: " java -jar /home/someserver/...
C.T's user avatar
  • 33
-2 votes
1 answer
6k views

How to get a process ID automaticly with command prompt [closed]

I´d want to know how to get a PID of a process with a single command in command prompt. I tried it with findstr, but I´m (apparently) not so smart to figure it out. You cannot use tasklist, because ...
Command Bomb's user avatar