commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
The dates in the output are Start Date, End Date, Days Remaining in warranty, respectively. This will only work if you are running it on a dell machine. You can substitute the dmidecode command with a service tag if you are not using a dell. Also, you have to either allow your user to run sudo dmidecode with no password or run this command as root.
There are 3 alternatives - vote for the best!
pretty much the same.
I use awk rather than grep and perl.
It looks like the URL has been updated.
The service tag can also be retrieved via snmp - potential for a for loop over a list of servers. I might have a look into doing an example.
If you can do better, submit your command here.
You must be signed in to comment.