-
mtll
I can't figure how to get changes to ~/.login.conf working
-
mtll
I'm trying to set times.allow for my own user, and I've been trying to set times.deny to a short interval of a few minutes to test whether the changes are taking
-
mtll
I obviously read the manpage, I ran cap_mkdb
-
ivy
mtll: you cannot set times.login in ~/.login.conf, this is supposed to be set by administrator in /etc/login.conf
-
ivy
times.allow rather
-
mtll
I see
-
mtll
is there some documentation on what can and can not be set in .login.conf
-
mtll
because the manpage is very vague about it
-
ivy
as far as i can tell, no, but there probably should be. if you don't find any documenation on this feel free to open a PR and cc ivy⊙fo
-
[tj]
" typically those which do not involve authentication, resource limits and accounting."
-
ivy
[tj]: this is quite vague though
-
mtll
[tj]: yeah, like I said, pretty vague
-
[tj]
uhuh
-
ivy
i agree it seems "obvious" that times.allow shouldn't be allowed, but there is a thing recently where users want to lock themselves out of their own accounts
-
mtll
so I guess I gotta make some login class, add my user to it, and my changes to /etc/login.conf
-
ivy
like, "i spend too much time on freebsd, only allow me to log in during these particular times"
-
mtll
ivy: yeah that's exactly what I want to do. and I mean it doesn't really matter where I put it, it's my personal desktop, and I'm the only user and administrator anyway
-
[tj]
that is probably the sentence to clarify, is ~/.login.conf applied to anything other than environment variables and does it apply to all
-
[tj]
otherwise the man page change is going to be quite intense
-
ivy
i think we can just say that nothing listed in the 'authentication' table may be added by the user themselves
-
ivy
we'll see what makes sense, at least i think a PR is justified here
-
mtll
just trying to stop myself from going 4 hours past my bedtime writing code when I get hyperfocused, and end up losing a bunch of sleep, and writing a bunch of shitty code that I'll have to rewrite anyway :P
-
[tj]
well login.conf won't help you there either and that is in the man page
-
[tj]
"Further enforcement over the life of a session requires a separate daemon to monitor transitions from an allowed period to a non-allowed one"
-
mtll
well times.allow seems like it'll work, along with a cronjob to lock my screen, right?
-
[tj]
I don't think your screen locker is going via login
-
[tj]
thats a guess based on a feeling
-
mtll
hrm. I did this before on linux with pam_time, although that doesn't seem to exist for openpam
-
ivy
it probably should do, but a lot of things don't...
-
ivy
(i noticed this while implementing pam_userjail)
-
mtll
worst case, I could always just cronjob a reboot with a 5 minute warning to save any files and such. be a bit annoying, but better sleep is worth it
-
mtll
this is what I liked about pam_time; pretty much anything that touches authentication uses pam, so this wasn't an issue
-
mtll
I guess I could port pam_time to openpam myself, it can't be that complicated. More effort than I'd like to invest right now though
-
[tj]
Just don’t start right before bedtime
-
mtll
:D
-
mtll
well, the good news is xdm does interact with login, because I was just able to set a short test window with times.deny
-
mtll
let's see if xlock does as well, more doubtful about that
-
mtll
it does not
-
[tj]
well xdm is creating a login, but xlock isn't
-
[tj]
can you create a new terminal in a deny time?
-
mtll
yes
-
mtll
you mean cause of the login shell
-
mtll
I guess that doesn't actually do any authentication
-
mtll
eh fine I'll just set up a cronjob with a reboot
-
mtll
I guess an alternative way to do all this would be to add two cronjobs as root with pw lock/unlock <user>
-
[tj]
I used to have a pomodoro timer which locked the screen after each interval
-
[tj]
but I could just log back in
-
appledash
I used to have gum that helped me quit smoking
-
appledash
but I could just smoke a cigarette
-
mtll
probably fine just as a reminder yeah
-
[tj]
it was "sleep 1800; i3lock "
-
ketas
hah
-
mtll
just trying to figure out the best way to warn me(via stumpwm) from the cronjob now
-
mtll
oh right, someone already made a little script for running stumpwm commands from the shell; I can just use that
-
ketas
echo 'go to sleep, neo...'
-
mtll
huh, stumpish doesn't work, because stumpwm doesn't show up in pgrep
-
mtll
shows up in htop just fine, under my user
-
mtll
maybe because it's spawned by xdm, which is run as root?
-
mtll
but the xterms started from stumpwm do show up
-
ketas
ps wwaux?
-
mtll
mtl 39183 0.0 0.1 1436272 91916 - Ss 11:25 0:02.43 /home/mtl/stumpwm/stumpwm
-
ketas
or pgrep -f
-
mtll
gotta go though, I'll have to figure this out later...
-
ketas
pgrep has stupid footshooting option -v, which is not verbose
-
ketas
i have at least killed everything in my machine with pkill -v
-
ketas
:p
-
ketas
at least once
-
ketas
pgrep -Slf is good way, but i like ps more to search stuff, eg this is for finding swapped out procs: ps wwauxd | awk 'NR==1||$8~/W/{print$0}' | less -InS
-
ketas
:p
-
ivy
i was not aware freebsd even supported swapping out entire process anymore
-
ketas
partially out i would guess
-
ketas
why does it matter?
-
ivy
are you sure W doesn't mean "Marks an idle interrupt thread", per ps(1)?
-
ivy
root@ixia:/usr/local/etc/bird.d # ps wwauxd|awk '$8 ~ /W/ {print}'
-
ivy
root 2 0.0 0.0 0 16 - WL 10:30 0:01.62 - [clock]
-
ivy
root 11 0.0 0.0 0 256 - WL 10:30 0:03.21 - [intr]
-
ivy
these are certainly not swapped out...
-
ketas
actually
-
ketas
there are multiple w's there
-
ketas
stupid eh
-
ketas
where's swappers tho?
-
ketas
top -bao swap 1000000 ?
-
ivy
i'm not sure i follow what you mean... you are matching on $8, which is 'state', and there is only one documented meaning for W
-
ivy
if by "where's swappers" you mean how do you find processes which have been swapped to disk, as i said, i do not believe freebsd supports this
-
ivy
i may be wrong here but i don't think swapping processes to disk has been a thing since like, 3BSD
-
ivy
it's basically pointless as soon as you have proper VM paging, which we got with VAX
-
ketas
top -bwao swap 1000000 maybe
-
ketas
there are two w's
-
ketas
another is down in manpage
-
ivy
can you please show the parts of the manpage you are talking about? i only see one
-
ketas
W The process is swapped out.
-
ketas
i only saw this
-
ketas
well top shows something?
-
ivy
hm, that text does not occur in my ps(1). what freebsd version are you on?
-
ketas
it's changed now eh?
-
ketas
damn
-
ketas
in current it's all gone
-
ketas
and there i can't check what top would show
-
ivy
-
ketas
but it exists there
-
ketas
so only top?!
-
ketas
surely there's still ps option
-
ketas
except i don't see it
-
ivy
no, there is no ps option because freebsd doesn't support swapping out processes
-
ivy
this commit was just removing the vestigates of obsolete code
-
ketas
hmm
-
ketas
what does it swap out then?
-
ketas
parts of proc memory so sure
-
ketas
that's what top shows
-
ketas
maybe definition issue
-
ketas
but it definitely swaps out some memory the proc is using
-
ketas
hence that one is swapped out, even if partially
-
ketas
what's the other way?
-
ketas
by definition whole idea is to move memory out of ram
-
MelMalik
i think someone swapped me out
-
ketas
i have no idea how different oses do it
-
ketas
right after birth?
-
ketas
:p
-
ketas
unsure what complete swapout means
-
ketas
kernel still knows it has it running
-
ketas
and what benefits are
-
ketas
i don't even know fbsd design that much
-
ivy
ketas: historically, "swapping" means moving the entire address space of a process to disk. "paging" means moving individual pages of a process to disk. freebsd does paging, not swapping
-
MelMalik
ketas, no, like, to flash
-
ivy
there is no ps flag for "this process has 1 or more pages paged out", as far as i know, since this is not really interesting
-
ketas
ah that
-
ketas
riiight
-
ketas
but who calls it like that
-
ivy
everyone, really?
-
ivy
no one says "this process is swapped out" nowadays, or if they do, they're probably wrong
-
ketas
but the location is still referred a swap, hence...
-
ivy
yes, and "swapping" is used to refer to pages being moved to/from disk, but that's different from the terminology used to refer to the actual state of a process
-
tsoome
statistically it does not really matter if you have 1 or 100 pages paged out to swap and counting those will likely require too much work.
-
ketas
what top does then?
-
MelMalik
is this about virt and rss
-
ketas
sure, it mentiones it being approx
-
MelMalik
it probably fudges the maths
-
ketas
rss is ram use iirc
-
ivy
virt and rss is nothing to do with swap
-
ivy
virt = virtual memory allocated to the process, rss = actual process size in memory (sort of, it's complicated)
-
ivy
neither of those tell you if any pages have been paged to disk
-
ketas
why is it virtual tho?
-
MelMalik
yes; the only reason I connect swap to that is that those two are traditionally considered memory stats and swapped pages are also
-
MelMalik
well, "traditionally" if you're me, idk if it's a real tradition
-
ketas
to say it's imaginary memory?
-
Koston
ketas, correct
-
ketas
may or may not exist as real ram?
-
ivy
ketas: it's virtual because BSD is a virtual memory operating system
-
ivy
imagine you mmap() a 4TB file into memory, your virtual memory size instantly jumps to 4TB
-
ivy
this doesn't mean you're using 4TB of memory, it just means 4TB worth of virtual address space is mapped to your process
-
ketas
yeah that's not ram space of memory
-
Koston
memory overcommit at work
-
ivy
huh?
-
ivy
Koston: no, nothing to do with overcommit
-
ketas
hence virtual
-
Koston
ivy, well if you *do* have well over 4TB, then not
-
Koston
I was assuming you don't, because most people don't.
-
ivy
ketas: right, it's virtual in the sense it doesn't refer to physical memory pages. it may do, but it may not
-
MelMalik
it's address space in use, not memory in use
-
ketas
what's opposite of virtual memory os?
-
ivy
Koston: mmap() does not rely on overcommit. overcommit is when you attempt to map pages that don't exist. having a page in virtual memory doesn't mean it's mapper
-
ivy
s/mapper/mapped
-
ketas
i think this was before even my sperm existed
-
MelMalik
excuse you.
-
ketas
i don't know history that much
-
MelMalik
ketas, the opposet of a VM OS might be an OS where the entire address space is in memory, though I am too eepy to do the very basic groundwork to search about it
-
Koston
ketas, smaller embedded systems running on hardware without an MMU. it just means an address refers directly to a location in physical RAM.
-
ketas
oh that
-
MelMalik
aha
-
ketas
yes they have them still
-
MelMalik
without an MMU or not using the MMU if there is one
-
Koston
typically these are systems that don't have an OS, just some software running directly on the hardware
-
MelMalik
the nature of OSness can be debated there
-
Koston
let's not
-
ketas
i vague recall wrt54g
-
MelMalik
is the stand libc you're using an OS?
-
ivy
some early Unix systems ran without virtual memory - for example, Unix on PDP-11. that's why PDP-11 had to swap out the entire process, it couldn't page individual pages
-
ketas
iirc that has no mmu?
-
ketas
or someone lied
-
ivy
but since VAX gave us virtual memory, Unix doesn't work like this
-
ketas
it has no pages?
-
ketas
and page was like individual memory allocation unit?
-
MelMalik
should i attach a tape machine with a drum roll sound to the access bus for the swap disk to fill the lab with drum roll noise when someone tries to continue running a programme they had swapped out
-
ivy
a page is the smallest amount of memory you can address via the MMU
-
ivy
since it would be infeasible to address every byte individually, memory is divided into pages
-
Koston
ketas, you should pick up a copy of Modern Operating Systems, or maybe Design and Implementation of the FreeBSD Operating System
-
MelMalik
for how much money, from which bookstores
-
ivy
MelMalik: free from anna's archive...
-
ketas
it's too difficult i'm afraid
-
MelMalik
and if I don't want to commit piracy?
-
ketas
i would also need to read on hw first maybe
-
ivy
then pay some $ to support the freebsd developers who put a huge amount of effort into writing it
-
Koston
former is much easier to read and much easier than you'd expect imho
-
MelMalik
would buying the book not do that? or is there not a way to buy the book
-
ketas
i would maybe choose lecture videos first
-
MelMalik
okay, changing tack: what are their ISBNs
-
Koston
the lecture video series by McKusick is wicked expensive
-
ketas
a book without anything else is just hell
-
ivy
MelMalik: oh, maybe i misunderstood the question, i thought you were suggesting the books were hard to find
-
tsoome
Modern Operating Systems is definitely good read, worth every penny
-
Koston
ketas, a book is hell?
-
MelMalik
ivy, hard to find for me, maybe.
-
MelMalik
but for someone who is actually looking, probably not
-
ketas
i mean reading a thick book, without doing any practical tests of something by the side
-
ketas
is super difficult somehow
-
ivy
i don't actually own FreeBSD D&I but i think i bought my copy of 4.4BSD D&I on Amazon
-
ketas
i haven't been in uni but there's a reason why they have mix of all this probably :p
-
MelMalik
my main complaint about anything ever is that the Tcl documentation in troff edition does not have cross references because it's troff and not mdoc
-
MelMalik
the cross references are just stated naked, i.e. as the manpage names
-
MelMalik
with (n)
-
ketas
funnily it depends on written material too, eg out manpages are really good
-
ketas
whoever made it all over decadea
-
ketas
s
-
Koston
FreeBSD documentation quality has suffered over the years, unfortunately
-
Koston
but it's still heaps ahead of Linux
-
ketas
why?
-
Koston
writing documentation is a lot of work and interest in operating systems has waned
-
Koston
-
ketas
interest in what
-
ketas
oses exist?
-
ketas
and it like doesn't need to be one person...
-
ketas
meh docs are hard
-
ketas
i have only wrote one manpage, for my own stuff
-
TommyC
write doxygen comments and call it a day :3
-
flyback
hey Im trying to bring up freebsd powerpc/power on a ibm system p5 520 power5+ but it's only detecting 128MB which isn't even enough to load the kernel
-
» flyback rubs vdamewood on his ibm system p5 520
-
flyback
*CANUCKED*-
-
» flyback wonders if linux or fbsd will be the first to still support this big endian turd
-
getz
flyback: my friend sent one of those to the e-waste bin a week ago :)
-
flyback
yeah I might have to do the same
-
flyback
although I just made progress
-
flyback
disableing msi and iommu it didn't kernel panic or opps as much
-
flyback
it couldn't find rootfs but that might be the fault of gentoo not having the ide driver loaded
-
flyback
im playing with freebsd also to see which one has more progress
-
flyback
yep looks like that is the fault of gentoo not having the ide driver compiled in
-
flyback
actually I could run both freebsd and linux if I have a licence for this power5 for their virtualization engine
-
flyback
or I *cough* just so happen to find a licence code lying around
-
deimosBSD
flyback: power5 is like 20 years old, isn't it?
-
deimosBSD
i think fbsd only supports power7 and higher from the power isa
-
deimosBSD
the main ppc page says power7, the wiki says power5. hmm.