Posts

Showing posts with the label troubleshooting

IPv4 and IPv6 Reception with rsyslog

Back in the day, when you wanted to change the default protocols rsyslog would listen on, you would modify the /etc/default/rsyslog file, and set the RSYSLOGD_OPTIONS variable accordingly. In rsyslog 8.x, this has changed, now, we control these parameters through the main rsyslog configuration file, and in within the global parameters. For instance, if we wanted to only listen on IPv6, then we would add the following lines to the main rsyslog configuration. # vi /etc/rsyslog.conf global(     net.ipprotocol="ipv4-only" ) Reference:  https://www.rsyslog.com/doc/v8-stable/rainerscript/global.html

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\...