Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

$HDFree for more than 1 drive?

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
riffraff
Posts: 18
Joined: April 8th, 2007, 1:48 pm
Location: Fife, Scotland

$HDFree for more than 1 drive?

Post by riffraff »

is it possible to give a total free from more than one drive?
if so whats the syntax
i tried Total Free $HDFree(C+E+F+G+H+I+J+K+L+M) but it only shows C: free space
any advice?

(yes i know its alot of drives 2.15Tb)
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

You can use the perf plugin (download from Smartie site) to get that sort of info (and lots of other stats):

Code: Select all

Disk space: $dll(perf,4,5,\LogicalDisk(_Total)\Free Megabytes)MB
That'll show you total free MB of disk space. To convert to GB (very useful if you have 2TB of space!!) you can use a math plugin like the demo (I think it has a divide function) to divide by 1024.

Experiment with the Performance administrative tool to find all the stats you can show.
riffraff
Posts: 18
Joined: April 8th, 2007, 1:48 pm
Location: Fife, Scotland

Post by riffraff »

i'll give it a go.

its just for the last 2 lines for 1 screen I wanted to Have
free space 254Gb
of total 2153Gb
as example

thanks for the code and the tip about performance tool ( i see a lot of screens being added)
but i can't see one for Total harddrive space or will that need to be manualy added?
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

It doesn't look like Smartie has an internal command to show total disk space, only the space on individual drives. I tried using $HDFree(_Total) as per performance monitor but that doesn't work. It looks like the perf plugin is the only way to do it currently.

For disk stats in the admin Performance tool, look in the LogicalDisk category (the "performance object" list).

See the examples in the perf plugin readme for how to use various stats in a Smartie screen.
riffraff
Posts: 18
Joined: April 8th, 2007, 1:48 pm
Location: Fife, Scotland

Post by riffraff »

Thanks for the help I'm now using the code of
Free Space: $dll(math,4,$dll(perf,4,5,\LogicalDisk(_Total)\Free Megabytes),1024)GB
Total Space: 1846GB
which is working well that maths bit you gave me allowed me to change it from 254.863486156GB to 254GB alot neater ( on a 4x20 display)

as for the total space part I've looked in every pull down menu section to double check but i can't find any refrence to a total space for harddrives ( speed/accesss rates/ cpu/ip info etc yes but not total harddrive space) which is a shame but nevermind, it was mainly cause i have a couple of USB drivers and i was hoping to have the total space reflect the fact they were connected or not but its better than it was and you can't have everything.

EDIT: I got it working. Not the shortest code in the world BUT
Total Space: $dll(demo,1,$dll(demo,1,$dll(demo,1,$dll(demo,1,$dll(demo,1,$dll(demo,1,$dll(demo,1,$dll(demo,1,$dll(demo,1,$dll(demo,1,$dll(demo,1,$HDTotag(C),$HDTotag(E)),$HDTotag(F)),$HDTotag(G)),$HDTotag(H)),$HDTotag(I)),$HDTotag(J)),$HDTotag(K)),$HDTotag(L)),$HDTotag(M)),$HDTotag(O)),$HDTotag(P)) GB
It even accepts the O & P drives which are USB Drives and not always connected, it works with and without them
Do i win a prize for the longest bit of useless code? :lol:

I'm hoping to have some of the screen shots ready to be posted later tonight.
Post Reply