Sys-Monitor-Lite
view release on metacpan or search on metacpan
lib/Sys/Monitor/Lite.pm view on Meta::CPAN
sub _mounted_filesystems {
my %seen;
my @mounts;
if (open my $fh, '<', '/proc/mounts') {
while (my $line = <$fh>) {
my ($device, $mount, $type, $opts) = (split /\s+/, $line)[0..3];
next if $seen{$mount}++;
next if $mount =~ m{^/(?:proc|sys|dev|run|snap)};
next if $type =~ /^(?:proc|sysfs|tmpfs|devtmpfs|cgroup.+|rpc_pipefs|overlay)$/;
next unless defined $mount && length $mount;
my @options = defined $opts && length $opts ? split(/,/, $opts) : ();
my $read_only = grep { $_ eq 'ro' } @options ? 1 : 0;
push @mounts, {
device => $device,
mount => $mount,
type => $type,
options => \@options,
( run in 1.187 second using v1.01-cache-2.11-cpan-2398b32b56e )