Posts

Showing posts with the label linux

Using strace to determine the I/O block size

I'm a big fan of IOMeter, but what if we didn't write the software that we want to test, and don't know the IO sizes it chooses? If it's a VMware VM, we can probably leverage vscsistats, but, I want to make this hypervisor agnostic, and so I turn to strace. In my baseline observations, I observed that 16KB reads and writes were the best for my storage, the question then became, what size IO is my application using? To answer this question, we need to leverage strace, and we care about reads and writes. We will assume that we want to look at a simple cat command on a large (2GB) file. Command: # strace -e read,write cat iobw.tst -o /var/log/strace.log This will read the file iobw.tst, and redirect the filtered strace output to /var/log/strace.log . When we open strace.log we see the following: write(1, "))))))))))))))))))))))))))))) )))"..., 65536) = 65536 read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\...

Installing the SSH Daemon on Arch Linux 2017.03.01

I tried to follow the instructions on   https://wiki.archlinux.org/ index.php/Secure_Shell   but they weren't so clear for me, since this was going into my lab, I just needed some "quick and dirty" instructions.  NOTE: Allowing root to login directly is a security risk. In this case, since it's my lab, I'm not concerned, but if this were in production, I would strongly advise that you do not allow root to login directly as this increases the attack surface of the machine.  1) Use the "ip addr" command to locate your local IP     # ip addr 2) Use the "pacman" package manager to install OpenSSH    # pacman -S openssh 3) Generate the SSH keys:    # ssh-keygen -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key    # ssh-keygen -N "" dsa -f /etc/ssh/ssh_host_dsa_key    # ssh-keygen -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key    # ssh-keygen -N "" -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key   ...