Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

How can I find out the manufacturing date of a battery from linux?

If this is not possible are there other tests to check if the battery new and healthy which I can run under linux?

share|improve this question
ls /sys/class/power_supply/*/ shows all information available to the kernel. – michas Mar 7 '14 at 21:51
up vote 9 down vote accepted


sudo dmidecode -t 22

from dmidecode manual:

       The SMBIOS specification defines the following DMI types:

       Type   Information
          0   BIOS
         21   Built-in Pointing Device
         22   Portable Battery
         23   System Reset

On my laptop, here is the output:

root@aularon-laptop:~# dmidecode -t 22
# dmidecode 2.11
SMBIOS 2.6 present.

Handle 0x0012, DMI type 22, 26 bytes
Portable Battery
    Location: Primary
    Design Capacity: 
    Design Voltage: 
    SBDS Version: 
    Maximum Error: 
    SBDS Serial Number: 
    SBDS Manufacture Date: 2010-10-10
    SBDS Chemistry: LION
    OEM-specific Information: 0x00000000


As you can see, my battery was manufactured on 2010-10-10.

share|improve this answer
So after all, there is a way to know manufacturing date. Good to know. :-) Great answer! – lgeorget Mar 7 '14 at 23:05
dmidecode has a lot of information to show, just run it with no arguments and see, it will list a lot of hardware information, as its manual says: dmidecode is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the sys‐tem's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. – aularon Mar 7 '14 at 23:16

From your system, you can access most information relative to your battery with cat /sys/class/power_supply/BAT0/uevent. BAT0 may be different on your system. On mine, it returns the following information :


Another useful command is acpi. For example, acpi -i on my system outputs the status of the battery, the charging status, etc.:

Battery 0: Unknown, 0%
Battery 0: design capacity 367 mAh, last full capacity 5475 mAh = 100%

I hope you'll get better results on your system. My battery is so used that it returns... well... nothing useful.

Apparently, there is no way to get the manufacturing date of the battery but I doubt it's an information available from the kernel after all. Depending on your manufacturer, there may exist a database available online which could give you the information from the serial number.


And apparently, I was wrong. :-) See the answer by @aularon about dmidecode.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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