![]() |
computer tips |
---|
this is pile of tips for users and admins that work with computer systems; in no particular order.
![]() |
sections |
---|
- automated user resource management
- restricting an address with postfix
- RT-AC68U drops connections
- ext4lazyinit
![]() |
automated user resource management |
---|
with linux, we are able to use pam's pam_exec.so in order to execute commands on specific actions, such as when a user logs in or out, or specifically on local or remote shells. these commands are ran as root, so tread carefully! this method uses systemd's resource control, but the method should be easily adaptable to systems running other init's.
edit a pam file
write a script to set slice resource limits
![]() |
restricting an address with postfix |
---|
to restrict the ability of an address to send and/or recieve mail, you must add or change the following in your postconf:
with this configuration, the address will be unable to send mail, and any receiving mail will be bounced. both attempts will return with an error of access denied.
![]() |
RT-AC68U drops connections |
---|
ASUS RT-AC68U routers running the AsusWRT-Merlin firmware may drop all connections while the system log is flooded with the following messages:
- Apr 23 14:09:16 kernel: TCP: time wait bucket table overflow
- Apr 23 14:09:16 kernel: TCP: time wait bucket table overflow
- Apr 23 14:09:16 kernel: TCP: time wait bucket table overflow
- Apr 23 14:09:16 kernel: TCP: time wait bucket table overflow
- Apr 23 14:09:16 kernel: TCP: time wait bucket table overflow
the solution is as follows:
by default, ours was 4096. 8196 worked well to stop the connection dropping, but we opted for 12288 to be safe. this is a rather annoying issue that should've been solved quite a long time ago, but alas, if you want something done right, you gotta do it yourself.
![]() |
ext4lazyinit |
---|
within linux, the ext4 filesystem features lazy initialization, which is aimed at speeding up the formatting of partitions. it does so by writing a partition's (sector's) inodes and journal gradually, instead of all at once. while in principle this sounds good, in practice -- and in particular, on large storage devices and arrays -- this can lead to the ext4lazyinit process chewing up cpu cycles and, more importantly, stifling data transfer speeds. in this situation, it may be desirable to disable this lazy initialization, which can be performed with the following extended arguments:
- lazy_itable_init=0
- lazy_journal_init=0
if a partition has already been formatted and is undergoing a lazy initialization, and you wish to speed it up, the following mount option can be passed:
- init_itable=0