CruzIT
Tuesday March 28, 2023 - 8:19:07 AM

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: 19340 MB
Total used space: 18855 MB
% used space: 49 %

Collecting For A Server Upgrade  

Howto display uptime information like:

Time since last reboot: 109 days, 23 hours, 34 minutes , 48 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  52681  Unique Visitors (IP Addresses) to this site.

Current users online : 20
Maximum users at a time : 80
Last 25 attacks have come from:
20.205.11.41
142.4.22.16
107.158.51.133
194.169.175.26
23.83.130.145
103.101.202.248
103.101.202.244
4.233.129.224
92.204.139.118
69.167.12.32
211.21.221.19
90.45.110.87
197.240.103.177
80.251.219.111
34.125.15.225
220.133.114.62
14.72.39.84
188.116.79.99
174.102.131.229
194.38.23.179
106.244.151.78
85.1.114.83
182.215.164.33
137.116.141.77
43.130.59.232

There are currently 25 unique IP addresses blacklisted.

Public cruzit.com Server Status
server offline dbc001  db cluster service
 Aw Crap!, It's Off-Line
server online www03  web service
 Is On-Line
server online www  web service
 Is On-Line
server online mx 08  mail service
 Is On-Line
server online www ha  F/O web service
 Is On-Line
server online mx 11  mail service
 Is On-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