Skip Menu |

This queue is for tickets about the Proc-ProcessTable CPAN distribution.

Report information
The Basics
Id: 71976
Status: resolved
Priority: 0/
Queue: Proc-ProcessTable

People
Owner: Nobody in particular
Requestors: CARNIL [...] cpan.org
vbrendel [...] iastate.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: CARNIL [...] cpan.org
Subject: libproc-processtable-perl: Proc::ProcessTable does not know states t, X, x, K for Linux
Hi This bug has been forwarded from http://bugs.debian.org/646785 Proc::ProcessTable does not known about all the states found in Linux source under fs/proc/array.c [1]. [1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=464763cf1c6df632dccc8f2f4c7e50163154a2c0 When Proc::ProcessTable encounters such a process, it returns ppt_warn("Ran into unknown state (hex char: %x)", (int) prs->state_c); i.e. for tracing stop processes, unknown state (hex char: 74). There is a bugreport already for the 'X (dead)' case [2]. [2] https://rt.cpan.org/Public/Bug/Display.html?id=54488 Could you add support for these states? Thanks in advance, Salvatore Bonaccorso, Debian Perl Group
Hi, thanks for the report. I plan to rewrite the entire handling by using code from my latest libstatgrab port (runs all Systems I have access to). You can pre-test by downloading it from http://www.netbsd.org/~rehsack/smart-snmpd/ and check the output from examples/process_snapshot Best regards, Jens
Subject: Re: [rt.cpan.org #71976] libproc-processtable-perl: Proc::ProcessTable does not know states t, X, x, K for Linux
Date: Thu, 27 Oct 2011 20:19:44 +0200
To: Jens Rehsack via RT <bug-Proc-ProcessTable [...] rt.cpan.org>
From: Salvatore Bonaccorso <carnil [...] cpan.org>
Hi Jens On Thu, Oct 27, 2011 at 10:51:27AM -0400, Jens Rehsack via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=71976 > > > Hi, > > thanks for the report. I plan to rewrite the entire handling by using > code from my latest libstatgrab port (runs all Systems I have access to). > You can pre-test by downloading it from > http://www.netbsd.org/~rehsack/smart-snmpd/ and check the output from > examples/process_snapshot
Thanks for this info. The link lead me to a 404. But I found the files with http://wwww.netbsd.org/~sno/smart-snmpd/ It sounds good! Today I tried too to work out a patch on current codebase on this, I have attached it. Regards, Salvatore

Message body is not shown because sender requested not to inline it.

Download signature.asc
application/pgp-signature 836b

Message body not shown because it is not plain text.

Subject: patch for Ran into unknown state Hex29 error in Linux.c
Date: Fri, 04 Nov 2011 15:06:19 -0500
To: bugs-Proc-ProcessTable [...] rt.cpan.org
From: Volker Brendel <vbrendel [...] iastate.edu>
attached. Apply in Proc-ProcessTable-0.45 directory with patch -np1 < 646785-and-handle-Hex29.patch This adds to previously posted 646785 patch. At least on some systems, commands can contain "(" and ")". See comments in the code. Volker -- Volker Brendel Bergdahl Professor of Bioinformatics Iowa State University Department of Genetics, Development and Cell Biology 2112 Molecular Biology Building Ames, Iowa 50011-3260 Tel.: (515) 294-9884 Fax: (515) 294-6755 http://brendelgroup.org/

Message body is not shown because sender requested not to inline it.

Subject: PS to patch 72182
Date: Tue, 08 Nov 2011 15:40:43 -0600
To: bugs-Proc-ProcessTable [...] rt.cpan.org
From: Volker Brendel <vbrendel [...] iastate.edu>
The command to issue the patch should have been listed as patch -p1 < 646785-and-handle-Hex29.patch (not "-np1"). VB -- Volker Brendel Bergdahl Professor of Bioinformatics Iowa State University Department of Genetics, Development and Cell Biology 2112 Molecular Biology Building Ames, Iowa 50011-3260 Tel.: (515) 294-9884 Fax: (515) 294-6755 http://brendelgroup.org/
From: zaebst [...] gmail.com
Hey Salvatore, This has been fixed in the github repo code. https://github.com/jwbargsten/perl-proc-processtable Added mappings (t,K,x,X) for the possible states given in the debain kernel code that were missing in Proc::ProcessTable for Linux. linux-3.2.35/fs/proc/array.c static const char * const task_state_array[] = { "R (running)", /* 0 */ "S (sleeping)", /* 1 */ "D (disk sleep)", /* 2 */ "T (stopped)", /* 4 */ "t (tracing stop)", /* 8 */ "Z (zombie)", /* 16 */ "X (dead)", /* 32 */ "x (dead)", /* 64 */ "K (wakekill)", /* 128 */ "W (waking)", /* 256 */ }; Thanks, Dave On Thu Oct 27 07:26:59 2011, CARNIL wrote: Show quoted text
> Hi > > This bug has been forwarded from http://bugs.debian.org/646785 > > Proc::ProcessTable does not known about all the states found in Linux > source under fs/proc/array.c [1]. > > [1] > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=464763cf1c6df632dccc8f2f4c7e50163154a2c0 > > When Proc::ProcessTable encounters such a process, it returns > > ppt_warn("Ran into unknown state (hex char: %x)", (int) prs-
> >state_c);
> > i.e. for tracing stop processes, unknown state (hex char: 74). > > There is a bugreport already for the 'X (dead)' case [2]. > > [2] https://rt.cpan.org/Public/Bug/Display.html?id=54488 > > Could you add support for these states? > > Thanks in advance, > Salvatore Bonaccorso, Debian Perl Group