Hot answers tagged

71

On my system it gets the uptime from /proc/uptime: $ strace -eopen uptime open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 open("/lib/libproc-3.2.8.so", O_RDONLY|O_CLOEXEC) = 3 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 open("/proc/version", O_RDONLY) = 3 open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3 ...


10

As long as I know, uptime uses /proc/uptime to calculate system uptime. You can see it more clearly in the source code uptime.c FILE *fp; fp = fopen ("/proc/uptime", "r"); if (fp != NULL) { char buf[BUFSIZ]; char *b = fgets (buf, BUFSIZ, fp); if (b == buf) { char *end_ptr; double upsecs = c_strtod ...


7

On a standard UNIX system (based on the original sources *), uptime reads /var/adm/utmpx and checks for the last time of reboot entry. In other words: this is retrieving the date you also get with who -b and then computes the time since then. *) uptime is a link to the w program and was introduced by BSD around 1980.


7

The Wheezy changelog lists all the package updates in each point release. This shows that Debian 7.7 was released with 3.2.63-2, while Debian 7.8 was released with version 3.2.65-1. So you won't find an installer image with the exact version you're looking for. But you can find the relevant kernel packages in the snapshots; this will allow you to install ...


5

The following instructions apply to building a kernel from upstream. Personally I find that simplest. I don't know how to obtain a tree with the ubuntu patches applied, ready to build like this. (1) Theoretically the way you build kernels in more reasonable timespans for testing is supposed to be cp /boot/config-`uname -r` .config you don't need to ...


3

Have a look here to see what modules you have installed... ls -la /lib/modules/$(uname -r)/kernel/net/ipv4 You should get a list of modules, I got this. tcp_bic.ko tcp_diag.ko tcp_highspeed.ko tcp_htcp.ko tcp_hybla.ko tcp_illinois.ko tcp_lp.ko tcp_scalable.ko tcp_vegas.ko tcp_veno.ko tcp_westwood.ko You can see what your kernel has configured by ...


2

Assuming you're running x86_64 (amd64) architecture, don't expect a huge difference in performance. This architecture gave things a new baseline for processor features (as compared to 32-bit code possibly going back to i386). Also, in the 32-bit world kernels and C libraries have already been compiled for different minimum architectures (i586, i686, ...). ...


2

If you're repeatedly building the kernel on the same machine, ccache can help a lot, especially if you're using a VM. In my experience, successive clean builds of the same project on a VM will build in about half the time as a build that didn't use ccache. You will need some extra disk space, to store the object files saved from the first build. Also the ...


2

Actually here two things are there to care about: Is the running kernel version is same are of the source we are using. As previously compiled kernel may not be having all the dependencies which may be used in latest version, while compilation of external module with latest kernel source may be dependent on any part of the code, which is only present in ...


2

Kees Cook implemented a sysctl to fill this need in early 2009. As documented in Documentation/sysctl/kernel.txt: modules_disabled: A toggle value indicating if modules are allowed to be loaded in an otherwise modular kernel. This toggle defaults to off (0), but can be set true (1). Once true, modules can be neither loaded nor unloaded, and ...


1

I don't know if there are isos with that kernel, but why don't you try to compile the kernel that you need. Here's a guide on how to compile a kernel for debian.


1

If you need a newer kernel, elrepo might be helpful and save you the grief: http://elrepo.org/tiki/tiki-index.php http://elrepo.org/linux/kernel/el6/ Don't expect it to necessarily be flawless. I tried one of the newer kernels on a CentOS 5 machine recently, for some reason the NFS server would not start. I ended up digging-in and rebuilt that server in ...


1

Short answer: Linux kernel 4.4 does not have this bug. You should not run into it on Ubuntu 16.04 LTS. Detailed answer If you follow the email chain that you linked, you'll get to this message by Nicolai Hähnle: Kernels that contain commit 954605ca "drm/radeon: use common fence implementation for fences, v4" are safe, older kernels require a ...


1

First, let me warn you that upgrading any OS in place has the potential to fail and then cause problems resulting from that failure. Having said that, Fedora 24 is still not yet released, so the latest official release of Fedora is Fedora 23. Instructions for that upgrade can be found at the Fedora Project Wiki. There are multiple methods for performing ...


1

[Self answer] While this is less than satisfying, we essentially went with @sjsam's advice and built a list of kernel versions by looking at the default kernel versions that ship with RedHat Enterprise Linux. Looking at versions of RHEL that are still in support today (April 2016), this gives us the list: 2.6.18 2.6.32 3.10.0 4.X (just for good measure, ...


1

You've already installed the necessary packages (linux-headers-4.4.0-1-amd64 and its dependency, linux-headers-4.4.0-1-common), but the headers don't end up in /usr/include/linux, they end up in /lib/modules/$(uname -r)/source/include/linux. As Gilles points out, these headers are only intended to be used by the kernel; they're exposed via /lib/modules so ...


1

The linux kernel source in Ubuntu is open source, so there is no problem with using (parts of) it, just like you can use any other linux kernel source. Using the Ubuntu name for your OS is not allowed unless you have permission from Canonical (who own the Ubuntu trademark), which in general is true for any other trademarks and their owners too. Of course ...


1

Yes, it's perfectly safe. It's mentioned in the manpage for mount(). Since Linux 2.4 a single filesystem can be visible at multiple mount points, and multiple mounts can be stacked on the same mount point. I think mmp is something else. Something about mounting a block device which is shared between multiple computers. So it's not ...


1

You can also temporarily blacklist them on the grub command line (linux line) when you boot with the syntax module_to_blacklist.blacklist=yes OR modprobe.blacklist=module_to_blacklist You need to modify the grub,cfg to make the changes permanent. Mind you, this solution will not work for few modules



Only top voted, non community-wiki answers of a minimum length are eligible