-
angry_vincent
kevans: nice. i have pretty minimal jail around 89MB in size with custom SRCCONF and SRC_ENV_CONF. it started and works. the pkgbase variant with FreeBSD-set-jail-minimal maybe little bit smaller but i not completely familiar with pkgbase.
-
pertho
I found something odd.. in FreeBSD, if you're running php_fpm, and you send it a Hangup signal (kill -1 / -HUP), it just kills php_fpm completely. With its debug messages on I see 'Hangup' in the terminal, followed by: /usr/local/etc/rc.d/php_fpm: WARNING: failed to start php_fpm. On Linux, sending signal 1 to the php "master" process just causes it to reload. Anyone know why? It's not a socket or network
-
pertho
issue (tried with both and it does the same thing on both)
-
pertho
damn.. I guess I need to use SIGUSR1 not HUP
-
karolyi
pertho: I run php_fpm here and there, but I mostly manage it via the startup scripts. I guess you meant rotating logs with SIGHUP, and so I looked it up in one of my jails, I use SIGUSR1 for that
-
kerneldove
wow is it me or do passkeys fucking suck?
-
Tuba
It's not you.
-
pertho
karolyi: yeah I just changed the newsyslog.conf entry from '1' to '30' (last field) .. which should do the trick
-
pertho
it's been years since I read about php-fpm and signals.. :D
-
Ellenor
USR2?
-
Ellenor
USR2 for reload
-
pertho
USR1 for log rotation
-
pertho
USR2 to reload config/children
-
Ellenor
yea
-
pertho
HUP just kills it dead :D
-
pertho
hooray for consistency! :D
-
Ellenor
seems a bit unintuitive for a program w/o a controlling terminal. if being run with a controlling terminal HUP killing makes sense, as HUP is the signal sent when the phone line clicks
-
pertho
Heh.. someone on Linux-side wrote a little shell script called /usr/lib/php/php8.x-fpm-reopenlogs .. which looks for the pidfile, and sends kill -USR1 to the number. newsyslog is a lot more capable than logrotate :D
-
Ellenor
which linux-side? debian?
-
pertho
ubuntu/debian
-
pertho
or, at least, in the Ondřej Surý packages
-
Ellenor
ah
-
pertho
the php_fpm rc script also has php_fpm_logrotate() so I guess you could just call /usr/local/etc/rc.d/php_fpm logrotate ?
-
karolyi
just use SIGUSR1 from newsyslog
-
karolyi
also, if you think php_fpm logrotating is a PITA, ask me about rotating uwsgi logs.
-
karolyi
hm, now that I mentioned it, I must just make a MR for the project to support it
-
pertho
karolyi: yeah I just used this: /var/log/php-fpm.log root:wheel 644 14 * @T00 GBJC /var/run/php-fpm.pid 30
-
pertho
I should just consolidate into one line and make it /var/log/*php*.log
-
pertho
because I have a php-fpm access log as well
-
karolyi
pertho: /home/website-wp/wordpress/log/*.log website-wp:website-wp 644 30 * $D5 JG /var/run/php-fpm.pid SIGUSR1
-
karolyi
is what I have. good luck
-
Ellenor
i wonder if i should do some crimes to php_fpm and uwsgi to obviate the logrotation gluteache
-
caxcadge
alias add b /buffer
-
pertho
karolyi: thanks! :)
-
kevans
angry_vincent: nice!
-
Ellenor
if I wanted to clear VERASE2, how would I theoretically go about that
-
warsoul
theoretically stty erase2 undef would clear it, disables the erase2 control char entirely by setting it to _POSIX_VDISABLE
-
skuzzee
hi folks, wondered if somebody can tell me if I have missed a step. I have configured a number of vlan interfaces on parent interface re2. There's no traffic passing into my switch from vlan 160 so to t-shoot I am looking for vlan tagged traffic on the freebsd box with `tcpdump -envi re vlan 160` however nothing is showing up. If I omit the traffic id of 160 I can see all the other vlan traffic belonging to different vlans.
-
skuzzee
How might I further discover what is going awry?
-
skuzzee
(typo: `tcpdump -envi re2 vlan 160`)
-
CrtxReavr
Been a minute since I did VLANs on FreeBSD.
-
CrtxReavr
I seem to remember though, the vlan interface should have its own "NIC" name that you would run tcpdump against.
-
zi
correct--you end up with ix0.1234 as a vlan interface off of ix0. you can also tcpdump -i ix0 vlan 1234 to see the same traffic as tcpdump -i ix0.1234
-
zi
skuzzee: pastebin your relavent rc.conf bits as well as the switch port config
-
CrtxReavr
I miss all the different things I used to do with FreeBSD when I was at EMC.
-
CrtxReavr
All sorts of crazy network appliances.
-
CrtxReavr
LACP link-aggregation, VLANs, a "WAN emulator", an in-line sniffer, an ntp server, that could be set to arbitrary times to test how clients would react to it.
-
hdconfigure_
Is it wise to use #!/usr/bin/env sh for easy bsd support or should by default I expect bsd developers to change the shebang
-
zi
hdconfigure_: any reason not to just use #!/bin/sh?
-
hdconfigure_
I thought #!/bin/sh does not work on freebsd
-
zi
works fine, but the key thing to be aware of is that /bin/sh is not bash
-
zi
so, if your script uses bashisms, you would need #!/usr/bin/env bash
-
hdconfigure_
ohhhh that explains why I was confused a few years ago. is freebsd posix compliant?
-
zi
/bin/sh is indeed POSIX compliant
-
hdconfigure_
so my language model is saying to use #!/usr/bin/env -S program --option value
-
hdconfigure_
does this seem like the best way if I want the shebang to run any program in "$PATH" with any arguments
-
zi
if your script needs a POSIX-compliant shell, just use #!/bin/sh. if you use bashisms, use #!/usr/bin/env bash
-
hdconfigure_
If all else fails I can use #!/bin/sh and then launch my program from within sh but I want to avoid that redirection and use shebang if possible
-
hdconfigure_
my only concern is the portability of this form #!/usr/bin/env -S program --option value
-
zi
what is program?
-
hdconfigure_
any executable that I can launch in sh by typing $/path/to/my/exceutable/executablename.filextension arg1 arg2 argn...
-
zi
oook, ill leave you to it then
-
hdconfigure_
thanks you have helped me alot already. I am gonna move this question to #bash
-
hdconfigure_
apparently that form I posted with the -S option is a gnuism
-
nimaje
well, freebsds env supports it too, but it isn't in posix, so check if all your target operating systems support it