CruzIT
Sunday April 11, 2021 - 5:42:16 PM

Registered Linux User #440901    


 
Login    Register
Login Required

HowTo Get Disk Information

Copy and paste this code into the page you want to show disk information for your web server:

<p>
<?php
// set partition
$fs = "/";
// display available and used space
echo "Total available space on this partition: " . 
round(disk_total_space($fs) / (1024*1024)) . " MB\r\n<br />"; 
echo "Total free space: " . round(disk_free_space($fs) / (1024*1024)) . " MB\r\n<br />";
// calculate used space
$disk_used_space =
round((disk_total_space($fs) - disk_free_space($fs)) / (1024*1024)); 
echo "Total used space: " . $disk_used_space . " MB\r\n<br />";
// calculate % used space
echo "% used space: " . round((disk_total_space($fs) -
disk_free_space($fs)) / disk_total_space($fs) * 100) . " %";
?>
</p>

That should produce something like this:

Total available space on this partition: 38243 MB
Total free space: 22716 MB
Total used space: 15528 MB
% used space: 41 %

Collecting For A Server Upgrade  

Howto display uptime information like:

Time since last reboot: 22 days, 6 hours, 32 minutes , 13 seconds

 

“Windows - Just Say No”

@ Active Member Project Honeypot  email addresses

This page was last modified on 09/1/18 @ 10:33:50:pm
This file name: howto_diskinfo.php

Questions, Comments, Suggestions or Requests should be sent to:  ronnie@cruzit.com 

There have been  3511  Unique Visitors (IP Addresses) to this site.

Current users online : 15
Maximum users at a time : 38
Last 25 attacks have come from:
105.67.6.41
89.45.46.91
150.95.110.113
197.90.167.114
109.182.149.187
35.183.60.188
13.66.139.71
142.93.195.85
202.28.123.198
41.185.8.140
34.237.4.205
197.159.149.217
62.210.129.161
15.207.88.38
208.109.9.134
54.151.184.195
132.148.165.43
104.37.31.57
13.66.139.63
13.66.139.110
52.204.222.198
45.141.159.63
72.255.34.28
193.142.146.202
20.84.113.215

There are currently 25 unique IP addresses blacklisted.

Public cruzit.com Server Status
server offline limelight  web service
 Aw Crap!, It's Off-Line
server offline limelight  mail service
 Aw Crap!, It's Off-Line
server online www  web service
 Is On-Line
server online mx 08  mail service
 Is On-Line
server online www01  F/O web service
 Is On-Line
server online mx 09  mail service
 Is On-Line
server offline tertiary  DNS service
 Aw Crap! It's Off-Line
server offline mx 10  mail service
 Aw Crap! It's Off-Line

©Copyright 2004-2021 - cruzit.com - Redd Enterprises™, Inc.,  All Rights Reserved.
Ubuntu® is a registered trademark of Canonical Ltd.
Linux® is a registered trademark of Linus Torvalds.
Apache® is a registered trademark of The Apache Software Foundation.
PHP® is a registered trademark of The PHP Group.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
All other product and service names mentioned are the trademarks of their respective companies.

 

pretrial
pretrial
pretrial
pretrial
Let us know what you think! finance@homelandcomputersecurity.com