CruzIT
Thursday November 30, 2023 - 10:50:09 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: 38195 MB
Total free space: 19822 MB
Total used space: 18373 MB
% used space: 48 %

Collecting For A Server Upgrade  

Howto display uptime information like:

Time since last reboot: 16 days, 11 hours, 39 minutes , 43 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  6736  Unique Visitors (IP Addresses) to this site.

Current users online : 18
Maximum users at a time : 62
Last 25 attacks have come from:
195.117.171.41
183.83.176.65
34.93.60.156
5.133.13.254
1.206.111.197
60.213.28.166
103.157.167.82
66.249.66.139
199.195.252.77
91.92.247.145
93.183.131.53
212.156.30.78
178.208.171.208
128.90.144.97
72.167.104.249
78.153.140.218
104.244.76.64
91.92.243.106
43.200.245.117
20.80.235.231
47.251.14.232
47.88.78.6
128.90.43.95
185.225.75.50
159.89.193.202

There are currently 25 unique IP addresses blacklisted.

Public cruzit.com Server Status
server online dbc001  db cluster service
 Is On-Line
server online www03  web service
 Is On-Line
server online www  web service
 Is On-Line
server offline mx 08  mail service
 Aw Crap!, It's Off-Line
server offline www ha  F/O web service
 Aw Crap!, It's Off-Line
server offline mx 11  mail service
 Aw Crap!, It's Off-Line
server online Primary  Client DNS
 Is On-Line
server online Secondary  Client DNS
 Is On-Line

©Copyright 2004-2023 - 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.
The MariaDB® a registered trademark of the MariaDB Corporation Ab.
MySQL® is a registered trademark of the Oracle Corporation Inc.
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