-
llua
depending on how fast memory is being claimed, usually yeah
-
wipt
Hey there! Sorta a FreeBSD question, sorta a networking question. I'm looking to upgrade my network to 10g fiber, switches are incredibly cheap now. But I also need PCI cards for a FreeBSD machine or two. I understand that I need that card to be compatible with BSD, but does the transceiver need to be compatible as well? I'm seeing intel ones listed in the hardware compatabilty chart, and then I have to
-
wipt
wonder if they'll be compatible with the switch then. Also don't know if I need single mode or multimode SFP+ cables.
-
wipt
Happy to be linked to a resource. I've dug around a lot on this, and haven't found much for helpful resources, and maybe I'm overthinking it - but I'd also like to avoid buying hardware that's not compatible, sorta just want to get things up and going and forget about it for the next 15 years when 40g or whatever is cheap.
-
ivy
wipt: Intel cards only officially support Intel-branded SFPs. unofficially, i've had non-Intel modules work on Intel cards using the FreeBSD ix(4) driver.
-
ivy
the modules on each end of the link do not need to be compatible with each other (that's implied by them both being 10GBASE-LR or whatever) but the module in the switch needs to be compatible with the switch, which varies by switch vendor
-
ivy
for cables, you need to match the transceiver to the cable type. tl;dr: always use 10GBASE-LR over single mode fibre, unless you have existing (legacy) multimode fibre or can't use singlmode for some reason
-
ivy
if you use multimode fibre, you would need 10GBASE-SX instead, and that does need to match, i.e. both ends should -LR or both should be -SR, because they use different wavelengths
-
ivy
i mean -SR, not -SX
-
ivy
also make sure you buy fibre with the right connector, for 10G SFP+ you will almost certainly want duplex (two core) LC, and if you have a choice between APC or UPC, choose UPC
-
kerneldove
llua ok ty
-
wipt
ivy: Thanks!
-
kerneldove
just installed 14.3 with zfs and i made the swap too little. there any way to increase the swap size?
-
kerneldove
swapinfo says the device is /dev/nda0p2 fwiw
-
deimosBSD
wipt: intel cards are well supported in freebsd. i use only singlemode os2 cables with intel cards because changing cards is easier than re-pulling fiber ever few years.
-
rwp
kerneldove, If you just installed 14.3 then you have little invested. Easiest way to change the partitioning is to start again and make another install. It's just easier. A few minutes of work. And it will be done.
-
kerneldove
ya i will if i have to rwp jc if it can be changed post install tho
-
rwp
It's possible but it is easier to reinstall if you don't have anything invested.
-
kerneldove
how?
-
kerneldove
edit fstab and reboot or?
-
rwp
Swap is a partition on the disk. In order to make swap partition larger the zfs data partitions would need to be made smaller.
-
kerneldove
ah damn fuck that ya i'll reinstall ty
-
fernie
wipt: dac cable is also option if it does not need to be more than 7 meters
-
Retrofan
Hi guys
-
Retrofan
Strange problem here.. I suddenly lost connection to my internet using the ethernet, after unplug/replug the cable. The device is connected but no internet. I factory rested router.. but no luck. I think my device is blocked from the router for no reason; bec. any other device I try using the same Lan cable is working fine. Also, pinging the router
-
Retrofan
ip "192.168.1.1" it retruns back "Host is down" error, and I can see on the router's admin panel an "Lease expired" warning for my device, but it never got any new ip (I tried to set static one on my device, but no luck). I want to mention that I am using that ISP all-in-one router for 11 years now..
-
Retrofan
tried every way ever I know (like restarting the netif and routing on freebsd) but no luck.
-
Retrofan
and I am mosaid
-
Retrofan
These been like that for days can't find fix, so please help me..
-
divlamir
You see any errors about your NIC in dmesg? Which way do you wanna go: static or DHCP?
-
Retrofan
DHCP
-
Retrofan
wait i will see
-
divlamir
So what happens when you do: dhclient IFNAME
-
Retrofan
only timed out error
-
divlamir
A problem with your router seems more likely, than one with FreeBSD
-
Retrofan
divlamir: reconnected and the router given me a new ip with renewal time, but no internet
-
divlamir
So you can ping the router now?
-
Retrofan
divlamir: I want to mention that the internet connection was lagging after I started using pulsaudio..
-
Retrofan
before the internet connection stopped
-
divlamir
I can't imagine any connection between the two
-
divlamir
Check your defalt route: netstat -rn | grep default
-
Retrofan
still the same Host is down
-
Retrofan
divlamir: GIves me the gateway ip (192.168.1.1 my router) and every thing else looks fine
-
Retrofan
I think the problem is my pc cannot connect to the gateway
-
divlamir
It gave you an IP, didn't it?
-
Retrofan
yeah
-
Retrofan
but cannot connect to the gatway after I get the ip
-
divlamir
So you *are* connected to the router
-
Retrofan
yeah
-
Retrofan
but no internet
-
Retrofan
only on my device
-
Retrofan
divlamir: So strange..
-
polarian
ivy: if you aren't busy could you look at this for me:
lists.freebsd.org/archives/freebsd-pf/2025-April/000723.html I posted it ages ago and bumped it but it never got any responses, been thinking about it recently because of EuroBSDCon and all where I am away I use VPN a lot but currently have to hotspot myself and use vpn via my phone.
-
polarian
could just be a config issue on my end
-
polarian
I know you are good with networking so I am asking you :P
-
polarian
I think you also use wireguard yourself, I believe you were the one giving config recommendations on the ML
-
polarian
if you could take a look at it for me I would be grateful, I can't really give you anything in return :/
-
polarian
wait a second
-
polarian
my config has slightly changed since this
-
polarian
lemme try it real quick
-
Retrofan
I also tried every port on my router.. I confirm that's the strangest thing I ever faced in my whole life
-
Retrofan
Wait a second I read somewhare few monthes ago, that's a bug in Freebsd when replug ethernet cable the default route will be lost..
-
mzar
you are spreading disinformation Retrofan
-
Retrofan
heh sorry
-
Retrofan
I only try to remember
-
Retrofan
But my route is not lost, Just my pc can't connect to it after I get my IP for no reason :(
-
Retrofan
Could be my MAC is the problem?
-
LxGHTNxNG
unlikely
-
Retrofan
So what?
-
Retrofan
every other device useing the same cable works...
-
Retrofan
look like it's just a really bad luck :(
-
polarian
ah wow
-
polarian
alright I dont know what it was, I tried now and it works for me
-
polarian
ignore my ping ivy it suddenly just worked, best not to touch it :D
-
Retrofan
polarian: can you help me..
-
polarian
Retrofan: you lost internet connection when wired
-
polarian
alright pastebin the output of ifconfig please
-
Retrofan
heh I can't copy it put I will try
-
thorongil
if i've got a jail running a previous version of FreeBSD and i run freebsd-update on the host, the jail will still work without modification, right? it's its own little world, all unto itself?
-
Retrofan
polarian: I couldn't copy it.. it's just the regular result, and I have got a ip form the router
-
Retrofan
but then router blocks me for no resaon of using the network but I am connected..
-
polarian
Retrofan: what is the status:
-
Retrofan
that happend after replug the ethernet
-
Retrofan
status?
-
polarian
yes but the IP can be preserved
-
polarian
just because the IP is there doesn't mean it is working
-
polarian
yes
-
polarian
ifconfig
-
polarian
each iface has a status
-
Retrofan
Ah
-
polarian
look for the ethernet interface
-
polarian
what is the status of it
-
Retrofan
preserved
-
polarian
hmm
-
Retrofan
I forgot that heh
-
polarian
that doesn't sound right
-
polarian
do you have a firewall
-
polarian
on the device
-
Retrofan
On freebsd
-
polarian
yes
-
Retrofan
not really at any high level
-
polarian
that doesnt answer the question
-
polarian
do you have a firewall y/n
-
Retrofan
Let me check
-
polarian
Retrofan: cat /etc/rc.conf | grep -e "pf" -e "firewall"
-
polarian
do you have either enabled?
-
polarian
if not then there is no firewall
-
polarian
FreeBSD has no firewall enabled by default btw
-
polarian
so if you did not set it up then you do not have one
-
polarian
Retrofan: also have you tried restarting the network stack
-
polarian
service netif restart
-
V_PauAmma_V
thorongil, do you mean previous minor version (eg 13.5 vs 13.4) or previous major version (eg 14 vs 13)? If the latter, only if your kernel configuration has the appropriate COMPAT(number) (the GENERIC kernel does).
-
Retrofan
It's enabled (but allows everything).. so I disabled it
-
thorongil
V_PauAmma_V: previous minor version, though in the future possibly major versions, too. thank you for the answer!
-
Retrofan
polarian:many times
-
polarian
alright dump your ifconfig to pastebin
-
polarian
and share it here
-
polarian
I have to go though
-
polarian
if nobody helps by the time I get back I will try and help
-
Retrofan
I said I can't no internet
-
polarian
the ifconfig output is required, its impossible to help without seeing the config
-
polarian
take a picture then
-
polarian
and upload it to a cdn
-
Retrofan
Ah ok
-
polarian
be back later
-
Retrofan
wait I am doing it
-
Retrofan
Can't copy it to windows device it fails
-
Retrofan
corrupted
-
kerneldove
there any way to track which files in a dir have been opened/accessed recently? i'm trying to figure out exactly which files are used for compiling a bin
-
zi
kerneldove: ktrace make?
-
byakuren
find . -type f -atime -1h
-
byakuren
(for accessed in the last hour)
-
kerneldove
byakuren, will that work even if i'm on zfs? because i think i have atime off by default no?
-
byakuren
ooh, that's a good question - it might not - give it go though, no harm in doing so - i don't have an atime-less zfs filesystem to test with at this very moment
-
byakuren
if not - then you might have luck with: find . -type f -cmin -60
-
kerneldove
know how i can verify atime is on or off for my zfs?
-
byakuren
zfs get atime
-
byakuren
oh actually - yeah it should work
-
kerneldove
looks like atime is off
-
kerneldove
what should work?
-
byakuren
likewise - forgot what system i was on - and the command worked for me c:
-
kerneldove
ah
-
kerneldove
how can "find . -type f -atime -1h" work even when zfs atime is off?
-
byakuren
looks like it works for hard file accesses, like touch and editing - but not for soft accesses like cat...etc - so may not work in your case
-
kerneldove
think i could test it by doing a build then run find . -type f -atime -1m ?
-
mosaid
Hi
-
byakuren
yeah! give it a go
-
mosaid
I got my connection back using wlan usb
-
byakuren
no harm in finding out - if not, then tracking will be your friend - i'll whip up my command gimme a sec
-
mosaid
So I think it's a cable problem
-
kerneldove
byakuren, i cleaned the build dir so build was fresh, then ran cargo build in the repo dir, build ran, then i ran the command, and it only outputted .git/index
-
byakuren
this should do ya if not find:
termbin.com/994f c:
-
kerneldove
do i replace "make" with "cargo build" ?
-
byakuren
yeah
-
byakuren
it'll trace whatever command you're doing following it `-f` follows child processes, which i guess you need to see ALL the files it might use
-
kerneldove
i tried to run it but truss said unable to follow forks for pid xxx operation not permitted. does it require sudo?
-
byakuren
huh, works fine for me without sudo-like commands - i've even just tried it in a cargo project
-
kerneldove
wtf
-
kerneldove
how can that be
-
kerneldove
which cargo proj? it public?
-
kerneldove
i'll test with same 1
-
kerneldove
i can clone a repo
-
byakuren
-rw-r--r-- 1 byakuren byakuren 3.8M Sep 14 22:20 ./truss.log
-
byakuren
i chose a repo i just happened to have locally that was fairly complex:
github.com/maxcurzi/tplay.git
-
kerneldove
just cloned it, same command truss -f -o truss.log cargo build, same operation not permitted error hmmm
-
kerneldove
does it matter im still on 14.1?
-
kerneldove
can't imagine why it would
-
byakuren
errr, i don't know that for sure - but i wouldn't expect it to
-
byakuren
you could err run the cargo build, then seperately call truss -f -o truss.log -p PID - with the PID of the cargo build, but that's a bit funky tbh and without sleep in the start of the cargo build process you'll miss the early files
-
kerneldove
got it!
-
kerneldove
needed to set security.bsd.unprivileged_proc_debug=1
-
byakuren
ohhh of course, i'm so sorry
-
kerneldove
no prob it's my fault
-
byakuren
c:
-
kerneldove
then i need to grep for open and read, why both jc?
-
byakuren
in case you were curious what was read from, and what just opened - no need to if you don't want to
-
byakuren
some build processes just open files to check they're present - not neccecarily reading from them, i didn't know if that was your use case - so included both for ya
-
kerneldove
i tried grepping for the name of the repo (to include only matches for the dir the repo's in) and that seems to cut it down pretty good
-
byakuren
neat! you got it :D - yeah you'll have all the data you need, just need to filter it down now
-
kerneldove
lots of fsstatat, openat, etc
-
kerneldove
but i think this'll work as a starting point, wow ty??
-
byakuren
c: no problem, i'm just glad i could help out
-
kerneldove
weird, there's only 1 read match for matches of the repo dir name. how can that be?
-
kerneldove
there's a read() for the repo's .git dir
-
kerneldove
lots of open and openat in the repo dir tho
-
kerneldove
lots of realpathat too
-
byakuren
grep open truss.log | grep $(basename $PWD) | cut -d '"' -f 2 | sort | uniq
-
byakuren
that should filter out the file lines for you you're intrested in - deduped
-
kerneldove
which syscall is actually reading the contents from the .rs files?
-
byakuren
(gimme a sec, just regenerating the truss log from a cargo clean)
-
byakuren
looks like a lot of openat and statat
-
kerneldove
do those read the contents?
-
byakuren
openat does
-
kerneldove
ohhhh ok now it's making sense
-
byakuren
\o/
-
kerneldove
this is starting to look really good (!?) in the output there's 2 forms of path tho which is kinda weird. 1 is the absolute and other is relative. so like /home/kerneldove/testrepo/pkgdir/src/file.rs, other like pkgdir/src/lib.rs. first group is always absolute, 2nd group is relative
-
kerneldove
i tried it on your tplay repo and it didn't happen so maybe it's not complex enough for that to happen?
-
byakuren
are the syscalls for them at the start different? open vs openat - openat takes a directory (something like AT_FDCWD) while open does not
-
kerneldove
i see pkgdir/src/lib.rs in both styles
-
byakuren
i'm not too sure then i'm afraid, as i don't have that file or your repo locally to poke about with
-
kerneldove
sec
-
kerneldove
ok git clone --depth 1
github.com/alacritty/alacritty; cd alacritty; truss -f -o truss.log cargo build -p alacritty_terminal; cat truss.log | grep $(basename $PWD) | cut -d '"' -f 2 | sort | uniq
-
byakuren
done that
-
kerneldove
see how 1st group of dirs is absolute /home/..., 2nd lower group is alacritty_terminal/... ?
-
byakuren
oh yeah - but only a small number of dirs at the bottom thee
-
kerneldove
ya, why is that?
-
byakuren
ahh - interesting - so when you run a cargo build - it basically scans all the files in the repo at the start for dependency resolution and indexing - so once the resolution and build is formalised, it then actually uses rustc on the relevant files to compile them
-
byakuren
so the relative ones at the end are the most relevant for you c:
-
kerneldove
does that mean the absolute path files aren't used for the actual building? or maybe both resolution/indexing and building?
-
byakuren
from what i can gather (i'm not a rust dev) - the relative files are used for building, the absolute ones are used for the dependancy resolution stuff - hence why README files and such are scanned initially absolute, but not at the end relative
-
kerneldove
hm i wonder if absolutes could be deleted (as long as they aren't also relative) and the build still succeed
-
byakuren
you'd prolly still need like the cargo.toml...etc files tho
-
byakuren
so you can't just delete the set difference
-
kerneldove
ya good call. ok well this is amazing, ty so much for helping me figure this out!!
-
byakuren
yeah no worries - i'd be curious to know how it goes!
-
byakuren
kerneldove: do feel free to ping me if i'm around and you need any help with stuff, i'd love to help out where i can c:
-
kerneldove
ok i'll do that. what i'm gonna try to make is a tool to autoslim repos to just what needs to be there for the pkg i want to be built
-
kerneldove
ty i appreciate it :D
-
byakuren
:D that sounds great!