-
RhodiumToad
46754 andrew 20 0 15371M 3305M swread 1 1:12 0.23% grep
-
RhodiumToad
what the fork?
-
RhodiumToad
why is this grep taking 15GB of ram?
-
RhodiumToad
ah. because it hit a 10GB sparse binary file
-
johnjaye
grep loads the entire file into memory at once?
-
johnjaye
i've recently realized this could be a bad thing.
-
RhodiumToad
I don't know why it didn't just skip the file for not being text
-
RhodiumToad
otoh this is gnugrep, so breakage is to be expected
-
johnjaye
is that why with gnu grep it stops in the middle of a file if there's a nul byte?
-
johnjaye
i've always wondered why it does that.
-
johnjaye
it just stops and says "Binary file matches"
-
RhodiumToad
if there's a nul byte then the file isn't text
-
johnjaye
is that the definition. or is it system dependent on what the line ending is
-
johnjaye
i recall trying to read in a text file that was just the bytes 0 to 127, and ruby didn't have any problem with it.
-
johnjaye
so maybe the default file open thing is not text but binary somehow
-
RhodiumToad
all files are binary
-
RhodiumToad
a file is just a sequence of bytes. the thing is that some programs want to guess whether that sequence of bytes represents something that can meaningfully be shown to the user by outputting (part of) it to the terminal
-
johnjaye
well. that makes sense.
-
ketas
why should switching from ttyv0 to v1 trigger some kind of video output change with vt?v
-
ketas
i should somehow unfuck if, as it's not an option to have screen going blank for a second and monitor recognizig new signal on every single terminal switch
-
ketas
i wonder if that's somehow machine specific, or maybe people don't ever use actual console anymore, because it's annoying if done more than once
-
crb
man sun made some absolutely beautiful computer cases
-
dkeav
indeed
-
dkeav
i miss them
-
cpet
all the things
-
crb
dkeav: Over COVID, I took one of the Ultra40 cases and converted it to house an AMD5950 running FreeBSD. It's really sweet.
-
JohnFranklin
Hi! I just installed FreeBSD 13.2 on my HiFive Unmatched using the documentation but when I try to bootstrap pkg I get an error message:
-
JohnFranklin
-
JohnFranklin
The site returns a 404, so that part makes sense, but something seems to have gone wrong with the URI generation? Any help would be appreciated!
-
parv
Do the packages exist for RISC V?
-
JohnFranklin
Unless I'm misreading this I'd imagine so: FreeBSD's support for the RISC-V architecture is currently classified as Tier-2, beginning with FreeBSD 13.0
-
JohnFranklin
Is there a website where I could check which packages are available for which ISA?
-
parv
-
VimDiesel
Title: riscv - FreeBSD Wiki
-
parv
... never mind that URL which was for "QEMU"
-
parv
-
VimDiesel
Title: Platforms | The FreeBSD Project
-
parv
"Tier 1"-supported platforms ought to have packages
-
JohnFranklin
Hm, that's sad to hear. I suppose that I can still build them from source?
-
parv
Do read the second URL on that
-
JohnFranklin
-
JohnFranklin
Admittedly I'm quite new to FreeBSD, only used GNU/Linux before. So does that mean I can get the base packages like a compiler from the repository and will have to compile the rest myself?
-
VimDiesel
Title: Committer's Guide | FreeBSD Documentation Portal
-
parv
Re: URL, Yes (section 21.4). Re: base packages: Does not look like that; may need to compile compiler (GCC and/or LLVM) with compiler from the base system.
-
parv
Perhaps someone may have compiled the packages to offer publicly(?)
-
parv
Last I read, LLVM+Clang in base did not come with all the parts that would be installed from The Ports or packages
-
JohnFranklin
Sounds like an adventure then, thanks!
-
parv
Happy Computering!
-
parv
-
VimDiesel
Title: riscv/ports - FreeBSD Wiki
-
» parv afk
-
eoli3n
hey, no freebsd community on lemmy
-
eoli3n
c/netbsd and c/openbsd exist
-
meena0
eoli3n: does Lemmy run on FreeBSD? ;)
-
eoli3n
meena0: i will be able to answer this soon
-
eoli3n
because i'll try to run my instance on freebsd
-
meena0
eoli3n: in my experience, rust has a better track record than go, so chances are it'll just compile, and if it does, it'll run, too
-
last1
is there a way to sort a list of IP addresses in the 'expected' order using the sort command ?
-
last1
so that 192.168.1.130 comes after 192.168.1.50 for example
-
spork_css
sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n ipaddr.list
-
spork_css
-
VimDiesel
Title: 8.3. Sorting IP Addresses - bash Cookbook [Book]
-
last1
woah
-
last1
complicated for something apparently so simple, but I can confirm it works
-
meena0
spork_css: now try that for IPv6
-
satanist
meena0: if I not miss anything only replace the '-t .' with '-t :' and use -k 1,1f ... (a few more are needed)
-
satanist
asume full v6 addresses so no truncation
-
rwp
The problem with IPv6 addresses are that it uses a run-length-encoding method of collapsing zeros into a double colon.
-
rwp
::1 is 0000:0000:0000:0000:0000:0000:0000:0001 for example. And so addresses don't sort without expanding first.
-
satanist
with -k 1,1fk ... you only need to expand the '::'
-
satanist
*h
-
satanist
^ thats wrong
-
markmcb
newish to freebsd. any recommendations best tool to use for managing regular zfs snapshots, pruning per policy, etc.? zrepl looks like it does the trick, but just wanted to check that there's not a defacto standard i'm missing
-
rwp
markmcb, I am sure there are many different ways but I am using the binary pkg zfstools (aka
github.com/bdrewery/zfstools) with cron for automatic snapshot creating and expiration.
-
rwp
I am only doing the auto snaps and not any of the SQL stuff that can also be used. Just set the property and let cron run the script and everything is fully automatic.
-
timothias
rsycn get you anything?
-
markmcb
rwp, i like that. nice and simple.
-
rwp
I started with it because M. Lucas recommended it in the Absolute FreeBSD book.
-
rwp
If you "pkg install zfstools" the package description emitted will contain instructions. If you miss that then "pkg info -D zfstools" will print the pkg description again at any time you want to read it again.
-
markmcb
thanks. i'm coming from btrfs on linux. my mind is blown by how much more polished the zfs toolset and ecosystem is.
-
rwp
I haven't used
zrepl.github.io which you mentioned myself so I am a poor one to talk about it but I think that is designed for replicating datasets from here locally to there remotely. Which I am sure was why timothias mentioned rsync. And I might through syncthing out there too. But you were asking about snapshots and pruning so I think zfs-auto-snapshot is the tool.
-
VimDiesel
Title: zrepl - ZFS replication — zrepl documentation
-
rwp
I sysadmin a variety of systems and btrfs is on some of them (because the people who created them like it) but as I work with btrfs more and more I find just how odd and bizarre it is in many ways. And comparing it to zfs just makes btrfs look sad.
-
markmcb
zrepl has some advanced features I wouldn't use, but handles basic snapshots and pruning quite well. (see first half of this config:
zrepl.github.io/quickstart/backup_to_external_disk.html )
-
VimDiesel
Title: Local Snapshots + Offline Backup to an External Disk — zrepl documentation
-
markmcb
btrfs is nice for it's flexibility. especially in a homelab, it lets you use the disks you have and doesn't complain much.
-
markmcb
but definitely the feature set, tool set, and performance is nothing compared to zfs
-
rwp
Oh! Well there you go then. Certainly if one were already using zrepl or also needing the other features then it would make sense to use it for automatic snapshots too.
-
rwp
btrfs has some pitfalls for the unwary though. Especially if actually using the multiple disk raid feature! That's really where all the snags exist.
-
rwp
A single drive btrfs such as on a laptop seems robust enough. But if you use multiple disks in a raid config then there are some traps.
-
markmcb
yeah, raid56 is not to be touched. lol. i've never had issues with raid1.
-
rwp
Such as if you actually have a drive failure DO NOT REBOOT or it won't reboot. It won't boot a degraded raid without telling it to boot degraded. Which if that is in a datacenter then you are screwed without a remote console or remote hands.
-
rwp
And do not use the boot degraded mode option all of the time thinking that would solve it either as that turns off a lot of normal safety checks.
-
rwp
If the machine is running, keep it running, then replace the failed device hot, and then "rebalance". If you scrub before rebalancing then AFAIK that also breaks things.
-
rwp
It's not that it can't work but that it has some traps and pitfalls to jump over and if you don't know them already then the experience can be harsh.
-
markmcb
yeah, you definitely need to understand its quirks
-
rwp
Meanwhile... I have been fighting with zfs with some flaky hardware and have yet to have zfs treat me badly.
-
rwp
For example I have a system that I think the motherboard is having problems. I am still not sure. So I am still flailing around with it a little bit.
-
rwp
The ZFS array had a serious I/O problem and kicked out half the drives and put the array state to SUSPENDED. Sounds grimm, right?
-
rwp
I popped out and back in three of the drives to give them a hard power cycle reset. Said "zpool clear" to clear the error.
-
markmcb
Hardware failures are always a delight. :)
-
rwp
That got the array back online clearing the SUSPENDED state. Did not reboot. Everything came back online.
-
markmcb
Yeah, I was experimenting with ZFS failures last week. Pulling hot disks, breaking stripes, dd'ing random stuff offline. It impressively survived all my abuse.
-
rwp
If that were mdadm raid (or btrfs!) I would have been really nervous. But having worked with zfs enough I am now pretty confident that the authors took the hypocratic oath very seriously. "First do no harm."
-
markmcb
I'm impressed with FreeBSD in general. I'm finding all sorts of things that are just more thought out.
-
markmcb
iovctl and sesutil are two small things i was happy to discover
-
rwp
I think I must swap my NAS to a different motherboard and then see if the flaky behavior continues or stops. I am convinced the drives are okay. I already swapped the disk controller card for a different one. And this motherboard recently had a ram socket failure so I am already running at half ram and thinking that failure is more than just the socket now.
-
rwp
All I need now is another system or another motherboard. But life and time is what keeps everything from happening all at once.
-
markmcb
yeah, sounds like time to abandon ship
-
markmcb
unrelated, is the quarterly pkg set simply more stable, i.e., less churn, or does it get additional scrutiny (e.g., security, testing, etc.) versus latest?
-
rwp
Definitely less churn with quarterly. If there is a security issue then all of them should be getting an update.
-
rwp
If it is a minor issue then it might be skipped on the quarterly. Which is just fine with me.
-
rwp
Very volatile things like Firefox and Chromium seem to be on their own schedule and updating as upstream updates.
-
rwp
For my servers I run the quarterly. I am also running quarterly on *my* desktop. For your desktop, run whatever you feel like running, it's your desktop! :-)
-
markmcb
coming from Arch ... so a week without updates is giving me anxiety! lol, just kidding. i'll probably leave it on quarterly. seems like everything i've installed is fairly recent, i.e., not like debian stable where things tend to be ancient
-
rwp
Debian Stable releases about every 2 years. That would have 8 quarterly releases in that time period.
-
rwp
But for example Firefox on quarterly seems to keep up with Firefox on Debian Unstable on my other system just fine. Often ahead of it.
-
rwp
Also remember that FreeBSD has a stable base core that is cohesive. It's released as a single base core release. All else is in the ports. (Ports become compiled into the binary pkgs.)
-
rwp
This allows ports to move asynchronous to the base core. But the system stability is really in the base core.
-
last1
is there a way to search for all symlinks that point to a certain starting directory ?
-
last1
aka, I want to find all symlinks in a directory that point to /dir1/blah
-
RhodiumToad
searching one dir, or a whole tree?
-
last1
a whole tree
-
llua
with find and sh
-
RhodiumToad
find ... -lname '/dir1/blah/*' might be what you want then
-
last1
lname is not the name of the link but what it points to, right ?
-
RhodiumToad
right
-
last1
let me try that - thank you
-
last1
it does work :) thanks!
-
last1
RhodiumToad: I think like I owe you a few hundred dollars (or more!) for all the advice you've given me lately