Compare commits

...

4 Commits

Author SHA1 Message Date
Zane C. B-H 5ff76abec6 note the changes 2019-08-15 17:25:14 -05:00
Zane C. B-H e79cdbe3a8 wchan support now works on Linux and bump version 2019-08-15 17:21:58 -05:00
Zane C. B-H 861ab9cfa5 typo fix 2019-08-15 17:20:19 -05:00
Zane C. B-H 0048e1528a linux wchan support 2019-08-15 17:15:19 -05:00
2 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,8 @@
Revision history for Proc-ProcessTable-Colorizer
0.4.0 2019-08-15/17:20
- WChan support now works on Linux.
0.3.1 2019-04-14/22:55
-Proc::ProcessTable does support nice on Linux.
-wchan on linux is garbage as it just returns a address,

View File

@ -15,11 +15,11 @@ Proc::ProcessTable::Colorizer - Like ps, but with colored columns and enhnaced f
=head1 VERSION
Version 0.3.1
Version 0.4.0
=cut
our $VERSION = '0.3.1';
our $VERSION = '0.4.0';
=head1 SYNOPSIS
@ -774,7 +774,13 @@ sub colorize{
}
if ( $^O =~ 'linux' ){
$item=color($self->nextColor).$left.' '.color($self->nextColor);
my $wchan='';
if ( -e '/proc/'.$proc->{pid}.'/wchan'){
open( my $wchan_fh, '<', '/proc/'.$proc->{pid}.'/wchan' );
$wchan=readline( $wchan_fh );
close( $wchan_fh );
}
$item=color($self->nextColor).$left.' '.color($self->nextColor).$wchan;
}else{
$item=color($self->nextColor).$left.' '.color($self->nextColor).$proc->{wchan};
}