Alternative way to implement quota warnings on the dashboard?

Hi all. We’re interested in setting up quota warnings on our OOD dashboard/front page. I think this would be immensely helpful as we sometimes get users who cannot launch interactive apps due to quota issues, and sometimes they aren’t sure how to troubleshoot. Having a warning would point people in the right direction and vastly improve their experience, I’m sure.

We’re having a bit of trouble getting the GPFS mmrepquota output shoved into a .json file. In looking at this discussion, it appears that the OSC ops team has a way of doing this, but the utilities are currently closed source: Disk Quota Warnings on Dashboard on Open OnDemand 3.0.1

My question is this: we’ve developed a bash script we place in /etc/profile.d that parses through the raw output of mmrepquota on login for that specific user account, and reports the user’s current quota utilization in their home directory. Is there any way that we could either wrap this into the MOTD so it echoes this info on the front page, or some other way to run this script when the user logs in to OnDemand? We have users that use OOD as their primary method of accessing the cluster, so this message is missed for those who go straight to the interactive apps and are not using an SSH client to log in.

Ultimately, the last line of the script contains an if statement that says if utilization is over 85% of the quota, an alert gets echoed warning the user that they need to clean up their directory. If we could just run this part of the script if that condition is met, and echo it in the MOTD or something like that, that would be great, but I don’t know if that’s possible.

Is there any way we could achieve that with the motd file or similar, or is the quota method in the docs going to be the only way?

Thank you!

I’ll look into our scripts and see what I can share. My guess is we haven’t open sourced it directly just because it’s full of OSCisms that won’t just work on other systems. In any case, I can see what we have and possibly sharing it with that caveat.

Yes you could issue commands in the MOTD. There are a few ERB MOTD variants that you could issue commands in and display the results.

That said - I think the quota reporting in OnDemand is better than this approach. The user may see the MOTD - they may not. They may just navigate directly to their batch connect sessions page, bypassing the MOTD altogether.

The quota reporting in OnDemand, however, is going to show up on every page and is nearly impossible to miss.