473,513 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Monitor the disk usage using perl without pakages

1 New Member
se strict;
use warnings;
my $x = <STDIN>;

foreach my $x ( sort glob('$x/*') ) {
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$a time,$mtime,$ctime,$blksize,$blocks)
= stat($x);
printf("%-40s %8u bytes\n", $x, $size);
}
Sep 1 '18 #1
1 3887
zmbd
5,501 Recognized Expert Moderator Expert
Rajesh Anumula:
Simple requests for code are not what we're about at Bytes.com
If you have a specific problem - we're happy to help.
If you have tried something already, then post your code; however, please use the [CODE/] format tool to format your script.
Sep 1 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1241
by: omkar prabhu | last post by:
i am using postgres 7.0.3 and also postgres 7.2.1 I am new towards using blobs,I want to transfers records with blobs from a table to different database(postgres) using perl without extracting...
6
2538
by: Matthew Nuzum | last post by:
We've had a chance to talk to some of our competitors who have recently gone out of business. One of the major failings that contributed to their collapse was not accurately understanding how much...
5
4438
by: Excluded_Middle | last post by:
Hi, I am trying to connect to db2 database and want to execute some basic SQL commands like create or select. I am on linux 7 redhat distribution and I have no rights to compile perl or install...
12
2399
by: Sankar | last post by:
Dear all, I am programming in Linux , wherein I need to know a couple of things. 1) Does an API exist that can copy file onto another file ( an API equivalent of 'cp') ? 2) Is there an API...
5
18389
by: soulofstar | last post by:
I want to monitor the CPU and RAM usage using Python, Now, I know how to monitor RAM usage by Python from ctypes import * from ctypes.wintypes import * class MEMORYSTATUS(Structure): ...
4
13022
by: isha123 | last post by:
how can i find the cpu usage of my windows XP SP2 machine from command line? And also how can i execute this command with Perl? or is there anyother way to find CPU usage for XP machine using Perl?
0
1638
by: garks | last post by:
I am using Exchange 2003(Exchange Hosting), C#. I am trying to get Mailbox usage using WMI But I follows the coding below, still cannot get the Mailbox usage. Even though, I predefined the...
6
14378
by: nb999 | last post by:
Hello All, I need to find disk space on one of my drives in windows machine using perl. But, I cant seem to find windows command that I can script. I have performed similar task for unix...
3
1544
Srijith B
by: Srijith B | last post by:
Hi, I have a code which maintains a certain partition in of my SD card. The code will -> Warn if the free space is less than 2% -> Else prints a complement statement I want the program to...
3
7540
by: omakhileshchand | last post by:
Sir, I have a text file that contain some fields,the fields are given below:-...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.