#!/usr/bin/perl use strict; use warnings; use GTop (); my $gtop = GTop->new; my $proc_mem = $gtop->proc_mem(2872); print "Shared memory of the current processes: ", my $share = $gtop->proc_mem($$)->share, "\n"; print "Total memory size of current processes: ", my $size = $gtop->proc_mem($$)->size, "\n";