Extract % Used (Storage)

pairjal
New Contributor II

Anyone can help me on how to export % Used (Storage) under inventory? I want to export the report from all computer. I used JSS 9.2

external image link

7 REPLIES 7

alan_trewartha
New Contributor III

revive

The only way I can see the data on this tab is computer by computer clicking in the JSS. Anyway to get an exported report that lists a machines disks with the partition info per disk?

I'm currently digging around in the SQL to see if I can craft a bespoke query! If there's a way to do this that I've just missed I'm gonna feel pretty stupid…

calumhunter
Valued Contributor

I'd probably use an extension attribute and a script for this.

#!/bin/bash
# Declare the name of the volume your trying to get stats for.
volname=Storage

df -lh | grep $volname | awk '{print $5}' | tail -n 1

alan_trewartha
New Contributor III

yeah I kind of had something like that all in place, but need something more wide ranging to get the data I need now. Unfortunately I need the data on machines not likely to call in for a while. Think I'll give it a go anyway. cheers

alan_trewartha
New Contributor III

Though, sidenote, I'm going with "diskutil list | cut -c34-" to get me full disk and partition sizes.

mm2270
Legendary Contributor III

This issue highlights one of the biggest and oldest gripes i have with the Casper Suite. Namely that. it captures a ton of great information about our Macs and iOS devices, but only around 75% of that information can be used in searches and/or added as columns in the output of a search. This is a frustrating aspect.
And while we can add Extension Attributes for capturing this, we are adding overhead to what's being done during a recon. Its ALREADY being captured natively. Why not just let us search on it???
Don't mistake me on this. I love Extension Attributes, but I prefer to reserve these for items that would never normally be captured in the suite, such as a custom application's details from its plist, a plug-ins version string, the presence of a file on disk, etc. Having to build an EA to capture something that's already in the Mac's record is the height of inefficiency!

Please JAMF, open up ALL items in a record for searching and reporting on. I just don't understand why this is still an issue. Its like having an encyclopedia that you can only flip to 3/4 of the pages in, the rest being for show only.

scottb
Honored Contributor

@mm2270, that's about as well as one can put it! Some of this stuff is really frustrating, especially given we're on version 9.x already. I was very excited about Casper before we implemented it, and while I still am, I often find myself frustrated and looking for patches/add-ons, etc. to get done what we need. I've only been using it for a year, so I don't have the history that some of yo guys do, but reading 100's of posts a day I've learned there's a lot to be done.

alan_trewartha
New Contributor III

General nod of agreement. In fact, case in point, what I'm finding most useful is the data I get scraping the API…

curl -s -k -u [api_read_user]:[password] https://[jss.address]/JSSResource/computers to get the ID list and then iterate through

curl -s -k -u [api_read_user]:[password] https://[jss.address]/JSSResource/computers/id/xx/subset/Hardware