Questions tagged [pid]

Process Identifier (PID)

Filter by
Sorted by
Tagged with
0 votes
2 answers
205 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
user avatar
1 vote
0 answers
1k 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 ...
user avatar
0 votes
1 answer
322 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/...
user avatar
  • 103
0 votes
0 answers
123 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-...
user avatar
  • 35
0 votes
2 answers
101 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 ...
user avatar
  • 35
0 votes
1 answer
53 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 ...
user avatar
1 vote
0 answers
715 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 ...
user avatar
  • 111
2 votes
2 answers
12k 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 ...
user avatar
  • 127
0 votes
2 answers
313 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 ...
user avatar
  • 131
0 votes
1 answer
1k 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 ...
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 ...
user avatar
  • 11
0 votes
2 answers
213 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 ...
user avatar
  • 103
0 votes
1 answer
1k 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 --...
user avatar
  • 681
0 votes
1 answer
553 views

Saving PID in nohup output

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....
user avatar
  • 137
1 vote
2 answers
502 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 : ...
user avatar
0 votes
1 answer
305 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 ...
user avatar
  • 89
0 votes
3 answers
8k 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 ...
user avatar
1 vote
2 answers
2k 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 ...
user avatar
0 votes
1 answer
5k 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 ...
user avatar
1 vote
1 answer
401 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 ...
user avatar
  • 111
1 vote
2 answers
460 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 ...
user avatar
  • 208
6 votes
3 answers
13k 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 ...
user avatar
0 votes
1 answer
150 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 ...
user avatar
  • 101
0 votes
1 answer
829 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 ...
user avatar
1 vote
1 answer
376 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 ...
user avatar
14 votes
3 answers
27k 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: /...
user avatar
0 votes
1 answer
61 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, ...
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 ...
user avatar
  • 13
0 votes
1 answer
411 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 ...
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 ...
user avatar
  • 125
1 vote
1 answer
826 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: ...
user avatar
  • 144
5 votes
2 answers
13k 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 ...
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....
user avatar
  • 113
2 votes
2 answers
736 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 ...
user avatar
-2 votes
2 answers
963 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?
user avatar
  • 169
4 votes
3 answers
17k 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 ...
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 ...
user avatar
2 votes
0 answers
56 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 ...
user avatar
  • 41
2 votes
1 answer
237 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 ...
user avatar
  • 21
0 votes
3 answers
61 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 ...
user avatar
0 votes
1 answer
997 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 ...
user avatar
  • 245
31 votes
4 answers
28k 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, ...
user avatar
  • 2,659
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....
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: ...
user avatar
6 votes
2 answers
8k 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 ...
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/...
user avatar
  • 33
-2 votes
1 answer
4k 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 ...
user avatar
-1 votes
1 answer
2k views

Pid and Lock files are not created in Nginx custom build Centos 7

I am trying to install nginx from source. After make install, I had a look at /var/run/ folder but I cant find the nginx.pid file and nginx.lock files there. This is my configuration: sudo ./...
user avatar
  • 1,421
0 votes
1 answer
1k views

Restarting shell script with &disown using Monit

I have a shell script that runs a C++ backend mail system (PluginHandler). I need to monitor this process in Monit and restart it if it fails. The script: export LD_LIBRARY_PATH=/usr/local/lib/:/...
user avatar
1 vote
1 answer
2k views

Could not access pid file for elasticsearch

I am not a die-hard linux engineer, but I am having some problems with starting Elastic Search. Some stats: Server: Ubuntu Server 11.04 Elastic Search: 1.2.3 (installed with appitude) When I start ...
user avatar