Tag Info

Hot answers tagged

15

You can write to /dev/random because it is part of the way to provide extra random bytes to /dev/random, but it is not sufficient, you also have to notify the system that there is additional entropy via an ioctl() call. I needed the same functionality for testing my smartcard setup program, as I did not want to wait for my mouse/keyboard to generate enough ...


12

Typically, it's designed by kernel developers and documented in man 4 random: Writing to /dev/random or /dev/urandom will update the entropy pool with the data written, but this will not result in a higher entropy count. This means that it will impact the contents read from both files, but it will not make reads from /dev/random faster.


9

This is not a dpkg-specific issue (as the new title of my edit suggests). Rather, this is something that every package manager (of which I am aware) does; and for good reason. Though, I do understand why it might be confusing. Package managers rely on databases to track the information for installed packages. If multiple users attempt to write to a database ...


8

There are multiple ways of accomplishing this. 1. Add your user to the group that owns the device Generally in most distros, block devices are owned by a specific group. All you need to do is add your user to that group. For example, on my system: # ls -l /dev/sdb brw-rw---- 1 root disk 8, 16 2014/07/07-21:32:25 /dev/sdb Thus I need to add my user to ...


6

The first DNS reply isn't ignored. getaddrinfo() didn't return until it received the response to the first AAAA query (ID: 26090). So the real problem here is why your machine hasn't immediately received the response to the AAAA query, while it has received the response for the A query (ID: 54755). One of the differences between getaddrinfo() and ...


6

Some ideas, assuming interfaces are eth0 and eth1: Sniff on both interfaces at the same time for non unicast traffic. You should see all packets twice ( tcpdump -nni eth0 -c 10 broadcast or multicast & tcpdump -nni eth1 -c 10 broadcast or multicast & ) | sort Probe with an IP-less protocol. For example with this tool to generate DHCP requests: ...


5

The read system call reads some bytes from an open file. The “odd string” is the bytes that are read by the call. This call attempts to read 32 bytes (third parameter), and succeeds (return value), from file descriptor 34. To find out what file your application is reading for, look back in the trace for the system call that opens this file descriptor. This ...


5

The lock file is used to prevent parallel execution of multiple instances. Why is this important for a package managers? A package manager — from a high level view — is a program which applies complex changes to the hard disk. The changes cannot be done in one step (“atomic”), so there are multiple steps; many of the steps depend on the result of ...


4

try using double quotes "": grep -oP "FW_6.0.0, SUCCESS" file OR (Because it is a fixed string, not a pattern): grep -oF "FW_6.0.0, SUCCESS" file from grep man page: -F, --fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. (-F is specified by POSIX.) ...


4

If you want to use awk: awk '/FW_6\.0\.0/ && /SUCCESS/' file


4

From the ping manpage (emphasis mine): When the specified number of packets have been sent (and received) or if the program is terminated with a SIGINT, a brief summary is displayed. Shorter current statistics can be obtained without termination of process with signal SIGQUIT. So this will work if you're fine with your stats being slightly less ...


3

You can use info command to know more details about any command in coreutils. Here is some portion in info ls, explain the -l option: `-l' `--format=long' `--format=verbose' In addition to the name of each file, print the file type, file mode bits, number of hard links, owner name, group name, size, and timestamp (*note Formatting file ...


3

On the surface, what you've suggested you've tried works for me. Example $ mkdir -p test/src test/firefox $ tree --noreport -fp . `-- [drwxrwxr-x] ./test |-- [drwxrwxr-x] ./test/firefox `-- [drwxrwxr-x] ./test/src Make the symbolic link: $ ln -s test/src test/firefox $ tree --noreport -fp . `-- [drwxrwxr-x] ./test |-- [drwxrwxr-x] ...


3

This is happening because you are launching subshells all over the place :-) The syntax you are using, where you do { some_stuff } 2>/dev/null | other_stuff, creates a subshell for each bit of code between the curly braces. This can be demonstrated fairly easily with the following script: #!/bin/bash { sleep 1; } | { sleep 2; } | { sleep 3; } & ps ...


3

If you have to reboot your server every 6 hours, you are probably doing something wrong. If you're doing this because of memory leaks in Minecraft or something like that, you might want to consider only restarting Minecraft, not the whole system. You can send keystrokes to a screen session "from the outside". (Searching really does wonders sometimes…) If ...


3

This was caused by an overly restrictive ruleset on a Juniper firewall that sits in front of the VMware infrastructure. I built a test resolver so that I could see both sides of the conversation, and the missing packet identified by Kempniu in his excellent answer was indeed being dropped somewhere along the way. As noted in that answer, getaddrinfo() with ...


3

Linux uses RAM in a different way from what other operating systems do. Rather than sitting there with unused RAM, Linux stores data that it thinks might be used in RAM-any applications may be cached here, files, etc. As a result, Linux RAM usage is higher than what is used by running applications. This extra usage is buffered to be sued by other things. ...


3

It won't affect the kernel itself (besides not taking advantage of the update). However, some newly installed programs might rely on newer kernel features. Also, if you run a program that relies on loading a kernel module then you may find that that module is no longer installed, and newly installed modules won't load in the old kernel. Basically, if ...


3

No, not really. The new kernels simply won't be used.


3

No. Mode 4 is for 802.3ad -- this protocol allows your server to talk to the switch and establish a bonded interface on both sides of the link. If your switches don't support it (or you're using switches that aren't stacked so they can form a single channel group that crosses both switches), then your channel group won't form correctly. You probably want ...


2

Do it manually sudo ss -tuanp or sudo netstat -tuanp Explanation: -t - show tcp sockets -u - show udp sockets -a - show all sockets -n - show numeric, don't resolve -p - show process name


2

You can do a "lazy unmount". A lazy unmount makes the filesystem unavailable to any new processes that are launched, but any processes which are currently using it will be able to continue using it. Then once those processes which are currently using it are finished, the filesystem will unmount. To do this, it's simply: umount -l /mount/point


2

You can use logrotate, which allows you to rotate the logs (based on the date, the size...) and to choose how many files you want to keep. For instance, here's my config file for apache: /var/log/apache2/*.log { weekly missingok rotate 52 compress delaycompress notifempty create 640 root adm ...


2

You can use a utility such as cronolog to manage the web server log files. Using cronolog, log files can be automatically rotated without having to shut down and restart the web server. excerpt cronolog is a simple filter program that reads log file entries from standard input and writes each entry to the output file specified by a filename template and ...


2

Try: grep -o 'FW_6.0.0.*SUCCESS' file We don't need -P option here.


2

You need to verify $PATH and $LD_LIBRARY_PATH environment variables. make sure they are point to correct version of ffmpeg and does not include older version if LD_LIBRARY_PATH is not already setup then try this : LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ffmpeg


2

Well, I do not expect a concise answer than the one available from here. What I understand about 32-bit OS is, the address is expressed in 32 bits, so at most the OS could use 2^32 = 4GB memory space The most that the process can address is 4GB. You are potentially confusing memory with address space. A process can have more memory than address space. ...


2

Those are escape sequences to set colors: ←[00;34 tries to turn on blue color and ←[00m tries to reset the color. It is up to your terminal to interpret those sequences and do the coloring. The real putty brings its own terminal, which is able to interpret these. If you use plink you are using your windows terminal which is not able to do so and simply ...


2

Like this: find . -name '*.bor' -exec zip '{}.zip' '{}' ';'


1

Collect all required information with monitoring commands: top → Current load and which processes consumes most of the cpu/memory free -m → Field under buffers/cache: Current memory status df -h → Check, if some of the local partitions running out of space Useful resources: ps aux --sort -rss sort most used processes by memory ps aux | sort -kr 3,3 | ...



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