Tag Info

New answers tagged

0

Short Answer: Device mapper in kernel versions after 2.6.31 (released September 9th 2009) includes support for "request-based" dm targets. So far only the only request-based dm target is dm-multipath. For the targets that remain BIO (i.e everything except multipath) scheduler selection is still present but irrelevant as the DM target hands off the IOP ...


0

Hyper-v core server linux VM performance specs ;-) [root@centos7-serv01 vfio]# time (dd if=/dev/zero of=/tmp/test bs=64k count=16k > /dev/null; sync) 16384+0 records in 16384+0 records out 1073741824 bytes (1.1 GB) copied, 1.07525 s, 999 MB/s real 0m1.137s user 0m0.005s sys 0m0.753s [root@centos7-serv01 vfio]# time (dd if=/dev/zero ...


2

512 byte is not really the default sector size. It depends on you hardware. You can display what physical/logical sector sizes your disk reports via the /sys pseudo filesystem, e.g.: # cat /sys/block/sda/queue/physical_block_size 4096 # cat /sys/block/sda/queue/logical_block_size 512 What is the difference between those two values? The ...


0

No, it is not possible, nor would it matter if it were. IO is typically done in units of at least 4096 bytes anyhow, and usually much more.


0

A new tool is now available to inspect already running processes files access, display progress and throughput estimation: https://github.com/Xfennec/cv If your somecommand or anothercommand are already known by cv, it is just as easy to use as watch cv -wq, or else you have to use -c option to monitor specifically your processes.


0

You should just do this with sed entirely since you're using it anyway: /opt/util/enum-users --level 2 | sed -n '/^Name:/h;//,/^Account/{ /^Account/!d;/TRUE[^:]*$/!d;g s/^[^:]*:[[:blank:]]*//p }' I don't actually know how the [[:blank:]] business should be handled, but the assumption made above is that an interesting line group will probably ...


1

I don't know if it is more efficient, but you could do this entirely in awk: awk -F': *' '$1 == "Name" {name = $2; next}; $0 == "Account disabled (or locked): TRUE" { print gensub(/.*\\/, "", 1, name) }'


1

Assuming the goal here is to find the lowest number divisible by integers 2 through n, trying to check every integer is massively inefficient. The easiest algorithm I can think of is to use an array of factors that will eventually be multiplied together to get the answer. It starts empty. Then, take each number in sequence, and divide out the factors that ...


2

I would iterate in decreasing order. The loop can terminate sooner. for ((check=12; check>1; --check)) { instead of for ((check=2; check<13; check++)) { Just think about it. If the number is not divisible by 12, it's not divisible by 4, 3 and 2 either. Not vice versa.


2

You can leverage the fact that (( returns zero when the result is non-zero: if (( $1 % check )); then ... fi


0

Given the clarification in the comment - the need of knowing how much data is being sent to the underlying block device (e.g. for the purposes of logging activity on SSD) - you'd need to check this in the file system driver and below (which usually is part of the kernel). Note, that just writing to a file doesn't mean the data gets really sent or even ...



Top 50 recent answers are included