Questions tagged [pid]

Process Identifier (PID)

Filter by
Sorted by
Tagged with
1
vote
0answers
395 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 ...
0
votes
1answer
121 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/...
0
votes
0answers
101 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-...
0
votes
2answers
96 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 ...
0
votes
1answer
45 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 ...
1
vote
0answers
356 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 ...
0
votes
1answer
6k 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 ...
0
votes
2answers
155 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 ...
0
votes
1answer
582 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 ...
0
votes
1answer
996 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 ...
0
votes
2answers
141 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 ...
0
votes
1answer
700 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 --...
0
votes
1answer
431 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....
1
vote
2answers
329 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 : ...
0
votes
1answer
133 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 ...
0
votes
3answers
6k 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 ...
1
vote
2answers
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 ...
0
votes
1answer
4k 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 ...
1
vote
1answer
301 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 ...
1
vote
2answers
397 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 ...
2
votes
2answers
10k 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 ...
0
votes
1answer
141 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 ...
0
votes
1answer
613 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 ...
1
vote
1answer
353 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 ...
13
votes
2answers
23k 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: /...
0
votes
1answer
52 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, ...
1
vote
1answer
1k 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 ...
0
votes
1answer
373 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 ...
3
votes
2answers
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 ...
1
vote
1answer
747 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: ...
4
votes
2answers
11k 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 ...
-1
votes
1answer
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....
2
votes
2answers
623 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 ...
-2
votes
2answers
819 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?
3
votes
3answers
12k 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 ...
1
vote
1answer
1k 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 ...
2
votes
0answers
42 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 ...
2
votes
1answer
202 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 ...
0
votes
3answers
60 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 ...
0
votes
1answer
760 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 ...
30
votes
4answers
23k 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, ...
1
vote
5answers
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....
3
votes
2answers
1k 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: ...
6
votes
2answers
7k 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 ...
2
votes
2answers
5k 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/...
-2
votes
1answer
3k 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 ...
-1
votes
1answer
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 ./...
0
votes
1answer
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/:/...
1
vote
1answer
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 ...
0
votes
1answer
1k views

Weird stuff in server error log?

I have a PHP script that shuts down server processes based on their PIDs. It seems like it works well, however, I found this weird stuff in Apache's error log. Any idea on what it's saying? [Thu Jul ...