-i, -interactive Ask the user for confirmation before killing a process.In this case, the -TERM switch indicates a SIGTERM signal is sent. Unless changed with - SIGNAL, SIGKILL is sent. -k, -kill Kill processes accessing the file. ![]() The following options are passed to the fuser command-a command to identify processes using files or sockets: sudo fuser -vki -TERM /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend You can run the following procedure-described by the Debian Wiki in the Q: What can be done when the dpkg lock is held? section. If Advanced Package Tool (APT) is hung, then the /var/lib/dpkg/lock and /var/lib/dpkg/lock-frontend lock files are probably held. Never send these signals unless it's not listening to other more graceful signals anymore. The state of the files on the file system can be left in a corrupt state. This signal is cannot be caught by the process, but the whole process will be cleaned up by the operating system (kernel) whether the process likes it or not. Sending a SIGKILL (decimal representation 9) is very unsafe. The lock files are left there until you finished that, and that's for a reason - to prevent new operations with the DPKG database in an unclean state. It knows how to recover from the broken state to an all-configured state and in that sense just continue from where it was interrupted. Practically speaking, if you've interrupted an apt-get operation, you can just finish it later using sudo dpkg -configure -a The way to fix is just firing a process to get all packages in the configured state. The lock files will only be released once it's all back in a clean state - you should get this fixed until it allows new operations. By killing the APT frontend, the database will be in a broken, but in known state. Every package has an actual state which is marked in as well as a current state, e.g. The DPKG database that the APT commands use under water can always detect whether an operation hasn't finished. Regarding the package management is a sort of special case. This signal is being trapped by the process itself can listen to it - and usually stop gracefully. In case it's an interactive process it usually allows you to stop it even safer by sending a SIGINT signal, usually sent by pressing Ctrl + C. What would make the laptop (either native or live usb) boot slowly at home but quickly at the cafe? Presumably, the other physical computer would behave similarly.Generally speaking for killing a process, there's no safer way to kill a process than with a regular kill (SIGTERM). The laptop updates very quickly at the cafe. The virtual machines update very quickly at home and at the cafe.ģ. The physical machines (1 laptop and 1 desktop) update very slowly at home (even with a usb boot, which uses a different mirror).Ģ. Both virtual machines also boot quickly at the cafe (around 5 seconds).ġ. ![]() In the cafe I booted to live usb, which I believe is not persistent. (Perhaps this is because there's nothing to update.) I did an update test and it finished almost instantaneously. I'm at a cafe now with one of the physical machines (a laptop). (I think it used, but I forgot to write it down.)Īll the previous update tests were done at home. At least one of the mirrors used was different:. The 2 physical machines took about 12 minutes to run the update.Īs another check, I did a "sudo apt-get update" after booting to live usb. For some reason the virtual machine doesn't hang and stall. All three Ubuntu machines (2 physical and 1 virtual) use us. and.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |