201 Matching Annotations
  1. Last 7 days
  2. Oct 2020
    1. Linux Memory Management at Scale

      "we had to build a complete and compliant operating system in order to perform resource control reliably"

      epic real-talk. the only people on the planet who seemed to have tamed linux for workloads. controlling memory. taming io. being on the bleeding edge, it turns out, is almost entirely about forward-progress. what can we reclaim?

      • oomd for memory protection
      • fbtax2
      • psi monitoring for io regulation
      • cgroups v2


  3. Sep 2020
  4. Aug 2020
  5. Jul 2020
    1. A shell script to automate the retrieval and installation of the Oracle (Sun) Java Runtime Environment
  6. Jun 2020
    1. To get a feel for how much pseudo-random data is available in your entropy pool, you can run this command:$ cat /proc/sys/kernel/random/entropy_avail 2684 The number shown appears to represent the number of bits of entropy that have been collected. Even 2,684 might not seem like much in a world in which we routinely speak in terms of terrabytes, but numbers above 100 are said to be a good sign. I
  7. May 2020
    1. I'd like to offer my thoughts on ctime verses mtime. Sorry, but this will be a little verbose. First, if you change the contents of a file you change the mtime of a file. Since this is a change to the inode, ctime is updated as well. The mtime is bit like the date on a letter and ctime is a bit like the postmark on the envelope. You can set mtime to anything you want via the utime() system call or the touch command. Doing so sets the ctime and you cannot reset ctime. If you restored last year's payroll records from tape, you might want to set the mtime back to the end of last year. But the ctime will reliably still indicate when the last change to the file occurred. This is how your backup program will know that it must back up the file. The ctime is really used by backup program. But an application program that prints out a payroll listing would use mtime.
    2. ctime indicates inode data change: ie. when you do chmod. chown on the file or when the file size changes. Not the contents of the file.

      ctime -inode -? ->file changes sizes

    1. ctime refers to changes made to the file's inode (such as changing permissions, etc). mtime refers to changes to the data within the file. So cnewer will use a reference files inode change time for the comparision, whereas newer will use a reference files data modification time.

      ctime - inode changes mtime - file changes atime - access time

    1. The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice.
    2. See this Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.
    1. So be careful running editing a bash script that may be currently executing. It could execute an invalid command, or do something very surprising.

      Never modify a running bash command as it can execute something surprising

    1. That app you desperately need in order to function? We probably have it. The vast software libraries of Ubuntu and Flatpak combine to make all of your tools available in a single location, called the Pop!_Shop.
  8. Apr 2020
    1. I could probably bootstrap my way up from this with the C compiler to write a terrible editor, then write a terrible TCP client, find my way out to ftp.gnu.org, get wget, and keep going from there. Assume that documentation is plentiful. You want a copy of the Stevens book so you can figure out how to do a DNS query by banging UDP over the network? Done.

      What would the author do in a situation of being alone in a room with:

      HD #1 is blank. HD #2 has a few scraps of a (Linux) OS on it: bootloader, kernel, C library and compiler, that sort of thing. There's a network connection of some sort, and that's about it. There are no editors and nothing more advanced than 'cat' to read files. You don't have jed, joe, emacs, pico, vi, or ed (eat flaming death). Don't even think about X. telnet, nc, ftp, ncftp, lftp, wget, curl, lynx, links? Luxury! Gone. Perl, Python and Ruby? Nope.

  9. Feb 2020
    1. I use this to keep information about processes that were running at any time during last five days. These are 1-min snapshots so something might get lost but I think it is good enough for me. I want to have some data available when I discover there was a peak in resource usage (I use munin for that). I haven't found a better way to keep track of past processes (tried psacct).
  10. Jan 2020
  11. Dec 2019
    1. Now using sudo to work around the root account is not only pointless, it's also dangerous: at first glance rsyncuser looks like an ordinary unprivileged account. But as I've already explained, it would be very easy for an attacker to gain full root access if he had already gained rsyncuser access. So essentially, you now have an additional root account that doesn't look like a root account at all, which is not a good thing.
    1. It is possible to do a successful file system migration by using rsync as described in this article and updating the fstab and bootloader as described in Migrate installation to new hardware. This essentially provides a way to convert any root file system to another one.
    2. rsync provides a way to do a copy of all data in a file system while preserving as much information as possible, including the file system metadata. It is a procedure of data cloning on a file system level where source and destination file systems do not need to be of the same type. It can be used for backing up, file system migration or data recovery.
    1. I am familiar with using rsync to back up various files from my system but what is the best way to completely restore a machine.
    1. I run the script daily, early every morning, as a cron job to ensure that I never forget to perform my backups.
    2. There are many options for performing backups. Most Linux distributions are provided with one or more open source programs specially designed to perform backups. There are many commercial options available as well. But none of those directly met my needs so I decided to use basic Linux tools to do the job.
    1. CloneZilla works perfectly. It produces small image files, has integrity check and works fast. If you want to use third device as image repository you should choose device-image when creating image of the first disk and then image-device when you restore it to second disk. If you want to use only two disks - you should use device-device mode. Optionally you may want generate new UUIDs, SSH-key (if SSH server installed), and change hostname.
    1. While there are so many tools to backup your systems, I find this method super easy and convenient, at least to me. Also, this method is way better than disk cloning with dd command. Because It doesn’t matter if your hard drive is different size, or use different filesystem.
    1. Beginner's Guide to Installing from Source http://moi.vonos.net/linux/beginners-installing-from-source/

      Linux From Scratch ... a quote from the vonos.net document: "This document was inspired by the TLDP document Software Building HOWTO which sadly is not actively maintained."

  12. Nov 2019
    1. CompizConfig Settings Manager's Place windows plug-in which will allow an application that isn't running to open on its particular workspace at its pre-defined X-Y coordinate,
    1. The thing is that each UI decision depends on countless other UI decisions. A simple example is keybindings. On UNIX/Linux, it’s nearly impossible to pick reasonable default bindings for global desktop navigation because they all conflict with bindings that some app is using. On Windows, the desktop navigation bindings are hardcoded, and no app uses them, because apps know for sure which bindings to avoid.
  13. Sep 2019
  14. May 2019
    1. we will include an in-house custom-built Linux kernel to underpin the newest version of the Windows Subsystem for Linux (WSL)
  15. Apr 2019
  16. Mar 2019
  17. Feb 2019
    1. A kernel driver is necessary to initalize the tablet and translate hardware-specific protocols into standard input events. We contribute patches directly to the Linux kernel, as well as maintain an out-of-tree kernel module that enables old kernels to work with many newer tablets.



  18. Dec 2018
  19. Nov 2018
    1. For compatibility head also supports an obsolete option syntax -[num][bkm][cqv], which is recognized only if it is specified first.
    2. ‘-n [-]num’ ‘--lines=[-]num’ Output the first num lines.
    3. ‘-c [-]num’ ‘--bytes=[-]num’ Print the first num bytes, instead of initial lines.
  20. Oct 2018
    1. the concept of magic numbers goes back to unix and pre-dates the use of file extensions. The original idea of the shell was that all 'executable' would look the same - it didn't matter how the file had been created or what program should be used to evaluate it. The shell would look at the contents of the file and determine the appropriate file. Microsoft came along and chose a different approach and the era of file extensions was born. Then to make things 'nicer' for users microsoft chose to 'hide' these extensions and the era of trojan files which look like they are of one type but really have a different extension and are processed by a different file was born.
    1. Does any one else think that Microsoft is harming the end users windows 10 system stability with a malicious reason behind it? This has been brought up several times in the security forums.

  21. Sep 2018
  22. Aug 2018
    1. RHEL mount hangs: nfs: server [...] not responding, still trying
  23. Jul 2018
  24. Apr 2018
    1. “The number of moving parts is so vast, and several of them are under the control of different groups. There’s no way you could ever pull it together into an integrated system in the same way as you can in a single commercial product with, you know, a single maniac in the middle.”

      While there are indeed many moving parts modern Version Control Systems take care of that properly and automatically. The idea of a Benevolent dictatorship dictating the course of the software is not wrong, but it's been shown that it limits the software itself, no matter how smart or good the dictator is, he/she will never be able to think about every aspect and possible applications of the software. And considering this is a tool for research and experimentation, limiting the tool on purpose is not a very good idea, if you ask me. EVEN THEN, an open-source model leaves space for a Benevolent dictatorship (just as Linux and Google does for many of its FOSS projects), so that isn't really an argument against an open-source non-commercial developing model, in the worst case scenario.

  25. Mar 2018
    1. 1) <hex_major><hex_minor> device number in hexadecimal represents itself * no leading 0x, for example b302. * 2) /dev/nfs represents Root_NFS (0xff) * 3) /dev/<disk_name> represents the device number of disk * 4) /dev/<disk_name><decimal> represents the device number * of partition - device number of disk plus the partition number * 5) /dev/<disk_name>p<decimal> - same as the above, that form is * used when disk name of partitioned disk ends on a digit. * 6) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the * unique id of a partition if the partition table provides it. * The UUID may be either an EFI/GPT UUID, or refer to an MSDOS * partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero- * filled hex representation of the 32-bit "NT disk signature", and PP * is a zero-filled hex representation of the 1-based partition number. * 7) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation to * a partition with a known unique id. * 8) <major>:<minor> major and minor number of the device separated by * a colon.

      this is all possible valid formats passed to root= option in linux boot command line

  26. Feb 2018
  27. Jan 2018
  28. Dec 2017
    1. You terminate a session by killing its parent process, called the session leader. Find out which process it is with: ps -dN|grep pts/3