CruzIT
Tuesday May 24, 2022 - 5:23:29 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: 38243 MB
Total free space: 18974 MB
Total used space: 19269 MB
% used space: 50 %

Collecting For A Server Upgrade  

Howto display uptime information like:

Time since last reboot: 137 days, 11 hours, 33 minutes , 21 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  33423  Unique Visitors (IP Addresses) to this site.

Current users online : 23
Maximum users at a time : 26
Last 25 attacks have come from:
52.140.198.11
172.104.159.48
43.130.46.55
116.203.221.198
207.46.13.187
20.91.185.110
143.110.224.182
52.189.119.150
167.99.78.164
20.53.12.20
37.151.165.225
143.198.111.120
3.34.123.89
3.15.193.244
69.163.203.121
161.97.103.248
34.102.11.143
170.187.155.78
180.211.99.217
216.119.142.131
51.210.251.22
94.130.11.28
17.121.112.73
102.165.48.50
167.172.65.208

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 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-2022 - 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