Tag Info

Hot answers tagged

20

The 1 GiB limit for Linux kernel memory in a 32-bit system is a consequence of 32-bit addressing, and it's a pretty stiff limit. It's not impossible to change, but it's there for a very good reason; changing it has consequences. Let's take the wayback machine to the early 1990s, when Linux was being created. Back in those days, we'd have arguments about ...


17

You can use the at command: $ sudo at 6:45 [sudo] password for root: warning: commands will be executed using /bin/sh at> poweroff at> <EOT> Don't type the <EOT>, but press Ctrl+D at the second at> prompt.


16

The short answer is no. The driver support for the same kernel version is configurable at compile time and also allows for module loading. The actual devices supported in a distro therefore depend on the included compiled in device drivers, compiled loadable modules for devices and actual installed modules. There are also devices not included in the ...


15

On most unix systems, you can use GDB. gdb -batch -ex bt -p 1234 There's also pstack (not a standard utility, you'll probably have to install it manually). It looks like an equivalent of AIX's procstack. But on my Debian wheezy amd64, it seems to always error out. On i386, for a program compiled without debugging symbols, it doesn't print any symbol, not ...


13

My first step would be to run strace on the process, best strace -s 99 -ffp 12345 if your process ID is 12345. This will show you all syscalls the program is doing. How to strace a process tells you more. If you insist on getting a stacktrace, google tells me the equivalent is pstack. But as I do not have it installed I use gdb: tweedleburg:~ # sleep ...


13

Two answers have been given for finding the stack trace of a program (remember to install debugging symbols first!). If you want to find out where a system call got stuck, examine /proc/PID/stack, which lists the kernel stack. Example: $ cat /proc/self/stack [<ffffffff81012b72>] save_stack_trace_tsk+0x22/0x40 [<ffffffff81213abe>] ...


12

You can use shutdown: sudo shutdown -h 06:45 & And to check it: ps -aux | grep shutdown If you want to cancel it: sudo killall shutdown This assumes of course that the shutdown time has already passed.


8

Somewhat. While what others are saying (that different distros build kernels differently) is technically true, it should be noted that because the Linux kernel has support for loadable modules, most distributions build support for all the hardware they can, because they might as well - this works because the drivers are built as modules, and then there's no ...


7

Use a format: $ seq -f "10.20.30.%g" 40 50 10.20.30.40 10.20.30.41 10.20.30.42 10.20.30.43 10.20.30.44 10.20.30.45 10.20.30.46 10.20.30.47 10.20.30.48 10.20.30.49 10.20.30.50 Unfortunately this is non-obvious as GNU doesn't like to write man pages.


6

The processes used news groups (USENET), and (predominantly) email. A bug "existed" as a thread, putting "[BUG REPORT]" or "LINUX BUG REPORT" in the subject was a common convention. There were no bug IDs. Given the typical user-base, a bug report often came with a patch. There was one long-forgotten software tool used: ibug (see below), other than that ...


5

join fileA fileB That assumes files are sorted on the first column (which they are in your example).


5

LDAP is a directory service (a type of database) along with a protocol that describes what information is stored, how to search it, etc. All kinds of things can be stored there, but in this case it'd be Unix user and group info. Very loosely, an alternative to /etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow. Or to NIS. NSS is glibc's name service ...


5

You can use sed command with seq to print range of IP address. seq 2 23 | sed 's/^/10.0.0./' OR using echo and tr echo 10.0.0.{2..23} | tr ' ' '\n'


4

Kernel versioning is independent of distro versioning, except to the extent that distros include patches of their own. This is indicated by tacking an extra identifier onto the version, e.g.: 3.16.6-203 Here 3.16.6 is the version of the vanilla (unmodified) kernel, and -203 is appended by the distro to indicate the relative version of their modifications ...


4

I don't know of any place where the kernel exposes the filenames associated with the blocks that it has cached. According to this answer http://stackoverflow.com/a/4941371 The best you could probably do even with a custom kernel module would be to get a list of inodes and devices. From there you would still likely need to walk the filesystem looking for ...


4

No, because : each distribution makes different choices when selecting which kernel features are enabled when building the kernel from source. I don't expect an enterprise distribution that focuses on server hardware to provide much provide support for a large range of soundcards for instance. some drivers still depend on vendor supplied (closed source) ...


3

I just wanted to add to this question as I was trying to disable transparent hugepages on CentOS v6 in order to enable TokuDB for MariaDB. I added the script mentioned by @slm to /etc/rc.local and it disabled transparent hugepages. However, because of the way startup scripts work in Linux, /etc/rc.local is executed after all the services are started. ...


3

awk 'FNR == NR { onecol[$0]=1;next; }; $1 in onecol' fileB fileA


3

Given you're using RHEL, SELinux is likely already installed. To confirm: $ rpm -aq | grep -i selinux selinux-policy-targeted-3.12.1-74.26.fc19.noarch libselinux-devel-2.1.13-15.fc19.x86_64 libselinux-2.1.13-15.fc19.x86_64 libselinux-utils-2.1.13-15.fc19.x86_64 selinux-policy-3.12.1-74.26.fc19.noarch libselinux-2.1.13-15.fc19.i686 ...


3

Since you mentioned you're new to Linux I'm going to assume you mean you're new to the Linux Distributions. Linux is 'only' the kernel to a distribution. To call Debian, RedHat, Ubuntu and others Linux would not be correct. A distribution comprises of a Linux kernel + a whole range of programs around it to give it more functionality. So to take Debian as an ...


3

If you have inotify-tools installed (at least that's the package name on Debian) when you can do something like this: while inotifywait -q -e modify filename >/dev/null; do echo "filename is changed" # do whatever else you need to do done This waits for the "modify" event to happen to the file named "filename". When that happens the inotifywait ...


3

Android is based on the Linux kernel. That, and a very stripped-down BusyBox. All the rest of GNU/X11/Apache/Linux/TeX/Perl/Python/FreeCiv is not present on Android. Asking why Linux doesn't emulate Android is like asking why trucks don't emulate airplanes — after all they're both big vehicles with wheels at the bottom. Most Android applications are ...


2

Presumably you're using Ubuntu (or similar) with no root password. The easiest option would be to remove your user password, login with no password (easy!) and set a new one. Warning: Only do this if you're in a reasonably safe environment (PC/laptop in home or office) etc - don't do it on a Internet connected, ssh enabled server especially if the ...


2

As long as you patch your bash shell you should be okay :) For more information on securing and patching the BASH shell check out this website: https://shellshocker.net/ You can first try upgrading bash sudo apt-get update && sudo apt-get install --only-upgrade bash If no upgrades are available I suggest compiling it yourself, we will start off ...


2

I’ve been able to do this with an udev rule, after some trickery (and using lsusb to find out the vendor and product ID of the device in flash mode): $ cat /etc/udev/rules.d/nxt.rules # disable NXT in flash mode ACTION=="add", ATTR{idVendor}=="03eb", ATTR{idProduct}=="6124", RUN="/bin/sh -c '/bin/echo -n $kernel:1.0 | /usr/bin/tee ...


2

You cannot resize the partition because the free space is not adjacent to it. You would have to move /dev/sdb7 to the end of the disk first (it may take very long) and then you can resize /dev/sdb9.


2

Firstly search if selinux is installed. rpm -qa | grep selinux, rpm -q policycoreutils, and rpm -qa | grep setroubleshoot If this doesn't show anything then install selinux by, sudo yum install selinux After selinux is installed, configure SELINUX=permissive in /etc/selinux/config Then finally restart your computer for selinux to take effect.


2

I want to add a little to Warren Young's excellent answer, because things are actually worse than he writes. The 1GB kernel address space is further divided into two parts. 128MB are for vmalloc and 896MB for lowmem. Never mind what it actually means. When allocating memory, kernel code must choose which of these it wants. You can't just get memory from ...


2

The first field of /proc/uptime is your friend for when (go read it with cat /proc/uptime). It's a running count of seconds that your system has been up. The second field of that file is how many cpuseconds have been idle on your system (divide it by the number of CPUs listed in /proc/cpuinfo in that system to get actual seconds). # if your awk is new ...


2

Firstly, as written, your ping will run forever unless it us unable to find the host, because it runs until it catches a signal (i. e. SIGINT) telling it to stop. Scripts in /etc/rc.local are not, as far as I recall, run in the background. As such, your script never finishes as it is an infinite loop. Depending on exactly why you are doing this, you could ...



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