Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to programatically determine whether CMOS battery is working or not. In my C++ program on linux I want to connect to internet and update system time if CMOS battery is not present or not working.

share|improve this question

closed as off-topic by Gilles, Eric Carvalho, RolandiXor Aug 19 '13 at 16:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – Gilles, Eric Carvalho, RolandiXor
If this question can be reworded to fit the rules in the help center, please edit the question.

I have not used SMBIOS for CMOS data (I use it to query for other data), but per it's manpage:

The files contained in usr/sbin retrieve and/or manipulate several parameters via the SMBIOS calls: activateCmosToken ascii2enUS_scancode assetTag retrieve the system’s Asset Tag createUnitTestFiles dellBiosUpdate dellLcdBrightness dellWirelessCtl disable_console_redir dumpCmos produce a dump of the CMOS dumpSmbios produce a dump of the SMBIOS in this system getPasswordFormat getSystemId isCmosTokenActive probes propertyTag retrieve the PropertyTag, if set serviceTag retrieve the Service Tag, the same which can be read in the label at the back (necessary to call DELL’s customer service) smitest perform SMI tests stateByteCtl tokenCtl upBootCtl verifySmiPassword wakeupCtl

See if this provides what you need:

On the man page is the link to download the files to use smbios. If this doesn't apply, let me know and I'll delete my post.

share|improve this answer
Can you please mention commands to query? I installed smbios-utils. I didn't find man pages for it. I tried sudo smbios-token-ctl dumpCmos and few other commands which gave me no information. The only command gave me bit of information is sudo getSystemId. Thanq. – neckTwi Aug 17 '13 at 5:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.