![]() # read each line of the free -m command for pretty printing in the next step Stdin, stdout, stderr = ssh.exec_command('free -m') Ssh.connect('', username='your_username', Ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) # set the ssh client, and force it to accept new/unknown host keys. # retrieve your ssh credential from your keychain.Ĭredential = keyring.get_password('example_keychain', 'user') (Easiest way to do this is with easy_install or pip.) Paramiko is a python ssh client, and keyring allows python programs to interact with the built-in keychain of your OS. For this script to work, you need the paramiko and keyring python libraries installed. I did this with a simple python script that is called by GeekTool on a regular schedule. In order to show memory usage, you just need a script to ssh to your server, run a quick shell script to check free -m, and then return the results as standard output. I use it to monitor my server’s memory load, and also to show my todo list using Todo.txt, a lightweight CLI todo list manager: GeekTool is a nifty little program that allows one to run shell scripts and have the output display on your OSX desktop. Once I figured out the minimum ram I could get away with on my setup (turned out to be 600MB), I wanted to keep track of memory usage at a glance without having to ssh from the terminal.Įnter GeekTool. In the process of moving everything onto the virtual machine, and nailing down my resource needs, I spent a lot of time on a secure shell monitoring the server with top for memory spikes. Cross fingers.I use a multisite wordpress installation to manage all of my courses, and a number of other virtual presences, hosted on a VPS at dreamhost. Setup a Policy in the JSS for deployment to all. Install package to a Mac, select it, logout and log back in, does it appear? Goto the DMG item, double click it and tick the FUT & FEU boxes on the 3rd tab, Options. Would love to see a post on setting correct Composer permissions. I've never seen anywhere that actually goes over permissions for Composer, I used root/admin for the GeekTool app & _unknown (99) for the rest as from what I've read that should make it inherit what already exists there. Setup the structure with these 4 files as per the pics & the permissions. Applications/GeekTool.app/Contents/PlugIns/GeekTool.prefPane/Contents/Resources/GeekTool Helper.appģb. The Geeklet from /~Library/Preferences/ - .plistĪ per user LaunchAgent to make it fire at Login - which I created and contains the following (paste into TextWrangler, save as a. The settings from /~Library/Preferences/. The app from /Applications - GeekTool.app subbing itsupport for your localadmin account. Using Composer, create a new Package by dragging in GeekTool.app & setting up the following structure. So we need to use the Fill User Template and Fill Existing User directories options.ģa. In my case I want to make it apply to existing Accounts on Mac's and any new ones. Open it up on your Mac and setup your geeklet, including the text, position, colour settings, and code for your displayed data.Įcho "Self Help: echo "Email IT Request: " "Įcho "Computer Name: " `scutil -get ComputerName `Įcho "IP Address: " `ifconfig en0 | grep "inet" | grep -v 127.0.0.1 | grep -v inet6 | awk ''`.Here's a brief guide on the process I used, which works for me in my basic environment but probably not the ideal way todo it. I have just finished doing this for our Mac's. We have signs w the printer problems icon over the printers. :) We have signs in the labs that show the "Report Computer Problem" icon really large so they actually use it most of the time. I linked to a screenshot of what my shortcuts look like. The form indicates where to find the computer name and the results of the form go to the ticket system. How I have mine set up is with some desktop shortcuts that go straight to a web form to report problems. It seems useful for refreshing the widgets on command or with a Casper policy instead of just plugging in a refresh time in the actual GeekTool - You mentioned wanting a URL to the ticket system. The latest version of GeekTool allows you to use AppleScript to control it, which I've only just started playing with. I'm working on improving the system I use for status messages, but the computer name works well. I use GeekTool to print the computer name and any statuses messages I throw in a text file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |