Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
Zane C. B-H | 5ff76abec6 | |
Zane C. B-H | e79cdbe3a8 | |
Zane C. B-H | 861ab9cfa5 | |
Zane C. B-H | 0048e1528a |
|
@ -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,
|
||||
|
|
|
@ -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};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue