# File monit/lib/symbiosis/monitor/check.rb, line 130
        def self.dpkg_running?
          begin 
            # Check the dpkg lock
            File.open('/var/lib/dpkg/lock','r+') do |fd|
              args = [Fcntl::F_WRLCK, IO::SEEK_SET, 0, 0, 0].pack("s2L2i")
              fd.fcntl(Fcntl::F_GETLK, args)
              Fcntl::F_WRLCK == args.unpack("s2L5i*").first
            end
          rescue Errno::EPERM, Errno::EACCES, Errno::EAGAIN, Errno::EINVAL => err
            return true
          end
        end