Wednesday, January 08, 2014

Canon shutter count and Linux...

Canon is well known for not allowing easy access to a camera's total shutter click count.  Apparently other manufacturers are not so guarded.  I use Canon cameras, so what to do?


A quick search using the Force (google) revealed several methods.
  • EOS Count is a for (small) pay website
  • EOSInfo is free, but can't report some DSLR shutter counts (including the 7D)
  • Linux + gPhoto2 is an Open Source Software solution that might drive some people nuts
You can probably guess which approach I took.  Yes, it was the Linux + gPhoto2 approach.

To be completely honest, I tried EOSInfo first.  It gave a correct count when I connected a 5D MkII, but it did nothing for a 7D.  This is why I turned to Linux and gPhoto2.

My recipe for getting at the 7D's shutter count and confirming the 5D MkII's shutter count is as follows -
  • MintOS Linux
  • Installed on a 4 gig USB stick using unetbootin
  • HP Pavilion dv7 booted to Linux
  • gPhoto2 installed from a terminal command line "sudo apt-get install gphoto2"
  • USB connect a camera to the computer
  • Turn on the camera
  • Open a terminal to access a command line interface
  • Type "gphoto2 --get-config /main/status/shuttercounter" to read the shutter count

I experienced two wrinkles, both having to do with being unable to lock the port or finding the port in use by another program.  The 7D required the following to work -
  • Terminal command line "ps aux | grep gphoto2"
  • Read the process(es) ID (PID(s)) of anything that says "gvfs gphoto"
  • "kill -9 " of all processes found in the prior command
  • In my case, the "gphoto2 --get-config /main/status/shuttercounter" command then worked
 In the case of the 5D MkII, I needed to do the following -
  • Connect a USB cable between the computer and camera
  • Turn on the 5D MkII
  • Terminal command line "gphoto2 --get-config /main/status/shuttercounter"
Attempting the 7D approach of finding and then killing PIDs related to gPhoto2 when connecting a 5D MkII did nothing but bump the PID by 2.  Go figure.  I'm sure there is plenty of detailed information in the various bug lists for Debian based Linux releases for what's happening or how to properly operate gPhoto2.  I didn't take the time to read any of it after finding my own work around. 

Brute Force and Ignorance (BF&I) rules!

In the end, the 5D MkII reports just a few ticks over 58,000 shutter actuations after five years of very hard use.  The 7D is much more lightly used, reporting just over 17,000 shutter clicks.  The 7D is still a youngster.  Though I heard from a friend yesterday that he knows of an original 12.8mpixel 5D that has over 800,000 shutter releases after having it's shutter mechanism attended to on a regular basis.  So with that in mind, the 5D mkII is also a youngster.

5 comments:

The Geeks said...

Thanks for review, it was excellent and very informative.
thank you :)

Christopher Perez said...

You're welcome.

I tried to keep is short and sweet, knowing full well there are many side-paths a person can take or traps a person can fall into.

Lucio Bracco said...
This comment has been removed by the author.
Lucio Bracco said...

Thanks for sharing your knowledge, very simple and useful tip. With your solution I succeeded where proper websites failed, It worked perfectly on my Canon 70D.

Christopher Perez said...

Lucio - I'm glad it helped. Sometimes these kinds of instructions fail for others where it might succeed for myself.