Chromebook drive percentage

250 views
Skip to first unread message

Gabriel Clifton

unread,
Dec 10, 2021, 5:32:30 PM12/10/21
to GAM for Google Workspace
I just came across a question in the GSFE Google Currents group about using GAM to get a list of all devices that have a high disk utilization like 90% and above and wipe them. I thought about scripting getting all device drive information, but then you have to script calculating drive percentage. Any thoughts on this?
gam print cros fields serialnumber,diskvolumereports
gam issuecommand cros query:id:<Serial Number> command remote_powerwash times_to_check_status 10 doit

Kim Nilsson

unread,
Dec 11, 2021, 10:09:00 AM12/11/21
to GAM for Google Workspace
I'm thinking a simple math operation comparing these two attributes, diskVolumeReports.volumeInfo.0.storageFree and diskVolumeReports.volumeInfo.0.storageTotal should be able to spit something out that is actually readable. Also, there are several volumes, and I don't know if it's a limited number? I see at least 0, 1, 2 & 3 in my report.

Also, this number formatting in Sheets was cool, to see numbers in a more manageable way.

Kim Nilsson

unread,
Dec 11, 2021, 10:10:21 AM12/11/21
to GAM for Google Workspace
Actually, I had a few instances up to volume 7.

Ross Scroggs

unread,
Dec 20, 2021, 11:07:31 PM12/20/21
to google-ap...@googlegroups.com
On Dec 11, 2021, at 7:09 AM, Kim Nilsson <there.is.no...@gmail.com> wrote:

I'm thinking a simple math operation comparing these two attributes, diskVolumeReports.volumeInfo.0.storageFree and diskVolumeReports.volumeInfo.0.storageTotal should be able to spit something out that is actually readable. Also, there are several volumes, and I don't know if it's a limited number? I see at least 0, 1, 2 & 3 in my report.

Also, this number formatting in Sheets was cool, to see numbers in a more manageable way.

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/c2b22741-2e20-4bc7-aff2-de829e8eb743n%40googlegroups.com.

Gabriel Clifton

unread,
Dec 21, 2021, 12:26:20 AM12/21/21
to google-ap...@googlegroups.com
I knew that genius would make that easy!


Cent frm my fone, I so tipos wth s nrml keybird. U xpect me d0 bttr wth a smallr keybord?

Gabriel Clifton

unread,
Dec 21, 2021, 2:55:52 PM12/21/21
to google-ap...@googlegroups.com
I hope I am doing something wrong, but when I add the new showdvrsfp, I don't get anything. I started with gam print cros basic showdvrsfp todrive and got all of the normal fields except the new one so I tried it without the basic option and got the same thing. Also, 
C:\>gam info cros showdvrsfp
CrOS Device: showdvrsfp, Show Info Failed: Does not exist

C:\>gam version simple
6.12.05




--

Gabriel Clifton | Network Administrator

Fort Stockton ISD | Technology Center
gabriel...@fsisd.net | http://www.fsisd.net
Office (432) 336-4055 ext 2

Fax (432) 336-4050
1204 W. Second St., 
Fort Stockton, TX 79735

Please note: Although we may sometimes respond to email, text, and phone calls instantly at all hours of the day, our regular support hours are 8:00 AM - 5:00 PM, Monday through Friday. We may need to wait until the next school day to attend to your issue. All issues are worked on a first-come, first-served basis depending on severity, and issues with proper work orders submitted are handled first.

Confidentiality notice: The contents of this email message and any attachments are intended solely for the addressee(s) and may contain confidential and/or privileged information and may be legally protected from disclosure. If you are not the intended recipient of this message or their agent, or if this message has been addressed to you in error, please immediately alert the sender by reply email and delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited.
"You must always be willing to work without applause."
— Ernest Hemingway

"You just have to find that thing that's special about you that distinguishes you from all the others, and through true talent, hard work, and passion, anything can happen."
— Dr. Dre

Kim Nilsson

unread,
Dec 21, 2021, 3:01:36 PM12/21/21
to Google Apps Manager
Nah, you need to add the field for the drive reports. I had one with lots of fields and just added the new option, which adds one column with % for each volume. 

Kim Nilsson

unread,
Dec 21, 2021, 3:02:21 PM12/21/21
to Google Apps Manager
Do note that there is no % character in the column, just the number. Between 0 and 100.

Ross Scroggs

unread,
Dec 21, 2021, 3:03:57 PM12/21/21
to google-ap...@googlegroups.com
You left out the deviceId
C:\>gam info cros showdvrsfp

$ gam info cros 8365f754-f37a-44d4-ab2b-72f495435bb0 showdvrsfp fields diskvolumereports
CrOS Device: 8365f754-f37a-44d4-ab2b-72f495435bb0
  diskVolumeReports
    volumeInfo
      volumeId: /home/chronos/u-6c82623bb25207ce4efd05e70ac9bfaa33c4a295/MyFiles
        storageFree: 20381261824
        storageTotal: 26256576512
        storageFreePercentage: 77
      volumeId: /media/archive
        storageFree: 2026315776
        storageTotal: 2026315776
        storageFreePercentage: 100
      volumeId: /usr/share/oem
        storageFree: 11681792
        storageTotal: 12042240
        storageFreePercentage: 97
      volumeId: /media/removable
        storageFree: 2026315776
        storageTotal: 2026315776
        storageFreePercentage: 100


Gabriel Clifton

unread,
Dec 27, 2021, 11:40:52 AM12/27/21
to GAM for Google Workspace
OK, I finally figured out my problem, when I used basic it would not do any drive info even if I added showdvrsfp fields diskvolumereports. I now have it added to my Chromebook inventory report and it is doing great!
Reply all
Reply to author
Forward
0 new messages