CruzIT
Friday December 02, 2022 - 8:35:09 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: 19641 MB
Total used space: 18554 MB
% used space: 49 %

Collecting For A Server Upgrade  

Howto display uptime information like:

Time since last reboot: 50 days, 17 hours, 24 minutes , 34 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  43271  Unique Visitors (IP Addresses) to this site.

Current users online : 18
Maximum users at a time : 42
Last 25 attacks have come from:
128.90.90.194
35.91.136.150
208.67.106.125
40.77.167.81
46.101.157.99
206.189.17.78
20.91.185.110
5.189.171.179
102.129.145.15
139.59.120.170
20.198.221.121
4.236.144.116
35.193.197.89
194.55.186.19
135.125.237.141
74.208.2.176
74.208.2.146
159.223.186.76
198.251.73.101
198.251.73.71
139.99.123.180
161.97.90.224
95.179.161.175
167.99.54.31
4.229.24.15

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