Displaying 20 results from an estimated 130 matches for "pgrep".
Did you mean:
grep
2007 Feb 02
2
Help with OS X (BSD) ps command
My fame package has a function that checks to see if a FAME SERVER process is
already running. On Linux, I can do this in one of two ways:
pid <- Sys.getpid()
user <- Sys.info()["user"]
cmd <- paste("pgrep -fU", user, "-P", pid, "'FAME SERVER'")
fameRunning <- as.logical(length(system(cmd, intern = T)))
or I can use
cmd <- paste("ps -ef | grep", user, "| grep", pid,
"| grep -v grep | grep -c 'FAME SERVER'&q...
2014 Sep 26
5
increase number of libvirt threads by starting tansient guest doamin - is it a bug?
hello,
if i start a transient guest doamin via "virsh create abcd.xml" i see an additional libvirt thread and also some open files:
pstree -h `pgrep libvirtd`
libvirtd───11*[{libvirtd}]
libvirtd 3016 root 21w REG 253,0 6044 1052094 /var/log/libvirt/libxl/abcd.log
libvirtd 3016 root 22r FIFO 0,8 0t0 126124 pipe
libvirtd 3016 root 23w FIFO 0,8 0t0 126124 pipe
libvir...
2011 Sep 07
1
process id of an R script
...number of runs of the same script on the same data. My 'solution' has been to create a process id file with the currently running script, first checking whether there is another process id file and whether that process is still running. I use the following code:
pid <- max(system("pgrep -x R", intern = TRUE))
if (file.exists("/var/run/myscript.pid")) {
rm(pid)
pid <- read.table("/var/run/myscript.pid")[[1]]
if (length(system(paste("ps -p", pid), intern = TRUE)) != 2) {
stop("Myscript is already running in another process.")
} else {...
2017 Feb 21
4
Re: "virsh list" hangs
...>> +++ killed by SIGINT +++
>>
>> root@vm-host:~# lsof /var/run/libvirt/libvirt-sock # hangs too ...
> This is very suspicious. Looks like the daemon is in some weird state
> and hence virsh is unable to get list of domains.
>
> # ps axf | grep libvirtd
> # gdb -p $(pgrep libvirtd)
> (gdb) t a a bt
>
> if you could run those commands and share the output that might shed
> more light.
>
> Michal
Unfortunately, gdb also hangs when attaching to libvirt ....
root@vm-host:~# gdb -q -p $(pgrep libvirtd)
Attaching to process 9556
[New LWP 9557]
[New LWP...
2015 Apr 08
3
Problems with getty and X on runlevel switch [Was: Re: The future of centos]
...? ??{gnome-+
? ? ? ??{gdm-session-wo}
? ? ??{gdm-simple-sla}
? ??{gdm-binary}
Xorg is in fact a sub-sub-process of gdm-binary.
While logged into a GNOME session, I ran the pgrep command as follows:
$ pgrep -fl gdm
1583 /usr/sbin/gdm-binary -nodaemon
1619 /usr/libexec/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
1622 /usr/bin/Xorg :0 -br -verbose -audit 4 -auth /var/run/gdm/auth-for-gdm-EcVz3c/database -nolisten tcp vt1
1801 pam: gdm-password
I restart...
2006 Sep 12
3
dtrace reports different counts depending on what is being traced
...obefunc]=count();
}
pid$1:libc:lwp_yield:entry
{
@[probefunc]=count();
}
pid$1:libc:mutex_lock:entry
{
@[probefunc]=count();
}
pid$1:libc:mutex_unlock:entry
{
@[probefunc]=count();
}
tick-10s { exit(0);}
2345 x4100-240-02 /export/home/dtrace/PIT > ./yield_lwp_count.d `pgrep
rrcpd`
lwp_yield 571
yield 572
mutex_lock 2394464
mutex_unlock 2394562
2358 x41...
2009 Jun 03
3
System V Init Script
...fires it up straight away so there is no problem there;
can someone suggest a better way as my scripting is very begginnerish (if
thats a word) and I don't doubt for a second I am doing this in a very
inefficient manner:
<snipety snip snip>
restart)
echo -n "Stopping my_app: "
pgrep my_app | while read PIDS; do # I have chosen this method because
my_app spawns various child processes
kill -9 $PIDS # and they all need to DIE!
(Killing the parent process would kill the child processes
done # however t...
2008 Mar 21
1
dtrace: failed to grab pid 16537: process is traced
I''m getting an odd behavior while trying to trace a mysql process using
the -p flag on a Sun Cluster.
This fails
# dtrace -n ''pid$target::*mysql_parse*:entry {}'' -p `pgrep -x mysqld`
dtrace: failed to grab pid 16537: process is traced
Yet this works
# dtrace -n ''pid$1::*mysql_parse*:entry {}'' `pgrep -x mysqld`
dtrace: description ''pid$1::*mysql_parse*:entry '' matched 1 probe
All processes managed within the Sun Cluster agent fram...
2014 Oct 01
0
Re: [libvirt] increase number of libvirt threads by starting tansient guest doamin - is it a bug?
ustermann78 at web.de wrote:
> hello,
>
> if i start a transient guest doamin via "virsh create abcd.xml" i see an additional libvirt thread and also some open files:
>
> pstree -h `pgrep libvirtd`
> libvirtd???11*[{libvirtd}]
>
> libvirtd 3016 root 21w REG 253,0 6044 1052094 /var/log/libvirt/libxl/abcd.log
> libvirtd 3016 root 22r FIFO 0,8 0t0 126124 pipe
> libvirtd 3016 root 23w FIFO 0,8...
2001 Oct 17
3
Again: bugs in contrib/solaris/opensshd.in and buildpkg.sh
(Shame on me: wrong filename in last posting, now here are correct
diffs)
in contrib/solaris/ (openssh-SNAP-20011017.tar.gz)
1) buildpkg.sh makes wrong link for /etc/init.d/opensshd
2) /etc/init.d/opensshd has not-working killproc
here my version tested on Solaris 2.4 and 8
(no pgrep with solaris 2.4, XARGS was undefined, simpler
syntax)
J?rg
--- contrib/solaris/buildpkg.sh Fri Oct 12 22:30:53 2001
+++ contrib/solaris/buildpkg.sh Tue Oct 16 13:53:07 2001
@@ -40,9 +40,9 @@
../opensshd.in > $FAKE_ROOT/etc/init.d/opensshd
chmod 711 $FAKE_ROOT/etc/init.d/opensshd
-ln...
2017 Feb 24
2
Re: "virsh list" hangs
2013 Jul 22
2
Libvirt-lxc and systemd question
...ner'/>
<target dir='/'/>
</filesystem>
</devices>
</domain>
$ virsh define test2.xml
Domain test2 defined from test2.xml
$ virsh start test2
Domain test2 started
# Attach to container to set account passwords
$ sudo nsenter -m -u -i -n -p -t `pgrep -f test2`
[sudo] password for mhicks:
[root@localhost /]# diff -q /srv/mycontainer/etc/passwd /etc/passwd
Files /srv/mycontainer/etc/passwd and /etc/passwd differ
Any ideas?
-Matt
2004 Aug 06
3
Propping up liveice
..._icecast
#
# This script ensures that icecast, liveice, and lame are alive, and
# restarts them if they're not. It checks for an expected number of
# process ids owned by "nobody". If those aren't found, it kills any
# stragglers and runs the appropriate startup script. It uses pgrep
# (find process by wildcard) and wc (word count).
#
# If everything looks alive, this script outputs nothing. Otherwise,
# it reports what had to be restarted and when. This script is
# intended to be run often via cron.
#
# TODO: It's possible that all the processes are alive, but that the
#...
2014 Mar 03
2
weird apache issue
...ng sockets available, shutting down
Unable to open logs
[FAILED]
[root at beta:~] #
IT complains that apache can't restart because apache is already listening.
So what you have to do in this case is kill it like so:
[root at beta:~] #pgrep httpd
12322
22405
22505
22506
22507
22508
22509
22510
22511
22512
[root at beta:~] #
[root at beta:~] #pkill httpd
And repeat as necessary until you can achieve this:
[root at beta:~] #pgrep httpd
[root at beta:~] #
It's a real pain with it being the way it is, because this makes it
impos...
2008 May 21
9
Slow pkginstalls due to long door_calls to nscd
Hi all,
I am installing a zone onto two different V445s running S10U4 and the
zones are taking hours to install (about 1000 packages), that is, the
problem is identical on both systems. A bit of trussing and dtracing has
shown that the pkginstalls being run by the zoneadm install are making
door_call calls to nscd that are taking very long, so far observed to be
5 to 40 seconds, but always in
2008 Feb 26
4
Why dtrace doesn''t work on some workstation?
Dtrace does work on some workstation, such as as follows,
-----------------------------------------------------------
bash-3.00# dtrace -s ./mem.d `pgrep test`
dtrace: script ''./mem.d'' matched 5 probes
^C
bash-3.00# uname -a
SunOS ftp 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Blade-100
bash-3.00# dtrace -V
dtrace: Sun D 1.1
---------------------------------------------------------
But it doesn''t work on some workstat...
2010 Nov 03
2
Watchdog for Tinc daemon
...aemon
it if dies.
Here is tinc.sh:
==========================================================
#!/bin/bash
# Tinc Process Monitor
# Restart Tinc daemon When It Goes Down
# Source: http://bash.cyberciti.biz/web-server/restart-apache2-httpd-shell-script/
RESTART="/etc/init.d/tinc restart"
PGREP="/usr/bin/pgrep"
TINCD="tincd"
$PGREP ${TINCD} || $RESTART
==========================================================
Put an entry into /etc/crontab every minute:
==========================================================
*/1 * * * * root /root/watchdog/tinc.sh >/de...
2013 Jul 22
0
Re: Libvirt-lxc and systemd question
...</filesystem>
> </devices>
> </domain>
>
> $ virsh define test2.xml
> Domain test2 defined from test2.xml
>
> $ virsh start test2
> Domain test2 started
>
> # Attach to container to set account passwords
> $ sudo nsenter -m -u -i -n -p -t `pgrep -f test2`
> [sudo] password for mhicks:
> [root@localhost /]# diff -q /srv/mycontainer/etc/passwd /etc/passwd
> Files /srv/mycontainer/etc/passwd and /etc/passwd differ
>
> Any ideas?
Your pgrep is probably selecting the wrong process. You want to attach
to the 'systemd' pr...
2017 Feb 24
0
Re: "virsh list" hangs
...> >
> > > root@vm-host:~# lsof /var/run/libvirt/libvirt-sock # hangs too ...
> > This is very suspicious. Looks like the daemon is in some weird state
> > and hence virsh is unable to get list of domains.
> >
> > # ps axf | grep libvirtd
> > # gdb -p $(pgrep libvirtd)
> > (gdb) t a a bt
> >
> > if you could run those commands and share the output that might shed
> > more light.
> >
> > Michal
>
> Unfortunately, gdb also hangs when attaching to libvirt ....
>
> root@vm-host:~# gdb -q -p $(pgrep libvirt...
2017 Feb 24
0
Re: "virsh list" hangs
...T +++
>>>
>>> root@vm-host:~# lsof /var/run/libvirt/libvirt-sock # hangs too ...
>> This is very suspicious. Looks like the daemon is in some weird state
>> and hence virsh is unable to get list of domains.
>>
>> # ps axf | grep libvirtd
>> # gdb -p $(pgrep libvirtd)
>> (gdb) t a a bt
>>
>> if you could run those commands and share the output that might shed
>> more light.
>>
>> Michal
>
> Unfortunately, gdb also hangs when attaching to libvirt ....
>
> root@vm-host:~# gdb -q -p $(pgrep libvirtd)
> At...