« first day (2757 days earlier)      last day (2194 days later) » 

2:13 AM
Shall I migrate this to Unix.SE? Alternatively, can you chime in on that question?
0
Q: ARM SoC UART interaction with peripheral UART

embI am sorry that I couldn't find this answer in this site or web. I have an ARM SoC(Host) which needs to communicate with the peripheral having ARM Micro controller using UART. Linux runs on top of ARM SoC. Below are my questions. From host side, If I want to write or read data, I understand tha...

 
 
5 hours later…
7:12 AM
@Kusalananda Is the author of stackoverflow.blog/2018/04/26/… a SE employee?
Though apparently the company name is Stack Overflow now.
How serious is this message, coming from smartd?
> The following warning/error was logged by the smartd daemon:

Device: /dev/sdg [SAT], unable to open device
 
@FaheemMitha I have very little knowledge of SE company structure and how SO fits in there. But he seems to be employed by someone related to SE at least.
 
Is this is a sign of impending failure? This device is an external USB drive.
Western Digital Passport. Should I consider buying another one? Is there any easy way to check the health of this drive?
@Kusalananda Me neither. But he seems to be speaking in some official capacity.
 
 
1 hour later…
8:22 AM
@StephenKitt With the answer you put yesterday you said fields 10 to 12 of /proc/[PID]/stat could help but descriptions are:
(10) minflt %lu
The number of minor faults the process has made which
have not required loading a memory page from disk.

(11) cminflt %lu
The number of minor faults that the process's waited-
for children have made.

(12) majflt %lu
The number of major faults the process has made which
have required loading a memory page from disk.
I'm not sure to understand how those value could help except maybe the 12th
Hello evryone :-)
 
@Kiwy I said fields 10 and 12, not 10 to 12. minflt increases whenever one or more pages are faulted in without hitting the disk; for a memory-mapped file, that means the fault was serviced from the page cache. majflt increases whenever pages are faulted in from disk; for a memory-mapped file, that means the fault resulted in actual block I/O.
 
8:38 AM
I might need a little explanation to be sure faults = Error ? Am I right ?
 
@Kiwy a page fault occurs when a process accesses a page of memory which isn’t present in RAM
when you mmap a file, the kernel creates a page mapping without actually loading anything
when your process hits one of the mapped pages, the kernel loads the data
(simplifying a bit, there are pre-load mechanisms in place)
 
@StephenKitt I bet nothing as easy in a kernel :D
that make a little more sense knowing what a page fault mean precisely though
 
@Kiwy I’m not the right person to determine that ;-)
it really depends on what you’re used to
 
OK if I follow you, minflt will increase if there's an attempt to read a part of the file which is already in ram and majflt will increase if the data had to be read from disk by the kernel.
@StephenKitt
Also I'm not really an expert of anything, just a know a bit of everything kind of guy... The deep mecanism at work inside the kernel seems blurry and foggy :D
 
@Kiwy that’s pretty much it
you mmap a file, then read bytes in the mapped area
if those bytes are already present in your process’ memory, nothing happens
if they’re not, a fault occurs
if the data is in the page cache, it’s mapped from there and the fault is minor
otherwise, it’s read from disk and the fault is major
the hard part is figuring out the granularity of reads, to map from page fault counts to bytes read
I ran tests with 2GiB files and consistently got 32768 page faults for the memory-mapped reads
which corresponds to 64KiB per page fault
 
8:48 AM
but it could vary is that what you're implying ?
 
possibly
the docs suggest that the kernel can increase the amount of data it reads, if there’s lots of activity
but I haven’t found where that’s handled yet to know for sure
 
@StephenKitt Thank you a lot taking the time to explain in detail. I will try to figure this by myself from now on . But I could also suggest an improvment in /proc/[stat]/io to add a read in memmap counter if data has to be be read from disk at any point it should count IMHO
 
@Kiwy that’s actually a really tough problem
/io currently reflects bytes which the program asked to read (imperfectly)
if it’s extended to cover memory-mapped files, the naïve way of doing it would count bytes loaded by the kernel
but the kernel tries to extrapolate reads, so it will tend to read more bytes than necessary
i.e. read bytes which the program didn’t ask to read
if you want to account for that precisely, you need to trap reads from memory which will have a significant performance impact
(I should add that to the answer...)
 
I couldn't monitor those read with strace, I will try to see if from the many job data I have I can more or less assume a value for memory page size
and do some extrapolation and approximation
 
@Kiwy yes
you could also look at blktrace and iosnoop if you’re only interested in bytes read from disk
 
8:56 AM
@StephenKitt I'll take a look I'm interested in anything having to deal with disk IO :D
 
@Kiwy blktrace is in most distros already, iosnoop is in
 
@StephenKitt Those perf-tools was on my to test list for some weeks I guess I will have to deal with them
 
 
2 hours later…
11:25 AM
@StephenKitt I know I'm being a bit picky here and also I would understand I bother you with those question, but if I read properly man proc on the /proc/[pid]/io i can see that rchar should contains read bytes from page cache :
> rchar: characters read
The number of bytes which this task has caused to be read from storage. This is simply the sum of bytes which this process passed to read(2) and similar system calls. It includes
things such as terminal I/O and is unaffected by whether or **not actual physical disk I/O was required (the read might have been satisfied from pagecache)**.
do I get this wrong or pagecache is yet another mecanism
Forget it
 
 
1 hour later…
12:39 PM
@Kiwy no, rchar counts everything returned by the read syscall (and a few others), regardless of where it came from
so you’ll see data from disk, the page cache, and even the terminal
if you run a plain cat and watch its rchar, you’ll see it go up as you type
 
@StephenKitt I see what you mean I've read some article about mmap. It seems that I'm not the first one to ask myself why IO on mmap object doesn't count :D And it seems as you mention it previously that this is a tought task
 
@Kiwy which article is that?
 
I've started thisone which is more an explanation
If you're interested I will forward you links I found
 
@Kiwy yes please!
 
12:54 PM
https://unix.stackexchange.com/review/low-quality-posts/241686
Should those kind of answer remove or kept as good example of bad answers ?
 
@Kiwy it does attempt to answer the question, it’s just wrong, which means it should be downvoted, not deleted (in most cases, IMO)
 
OK I feel like leaving real bad answer is not really productive. Sometime an answer is just missing a bit of explanation and is still correct, when one answers but put wrong information in it I feel it should be removed.
Though in this case there's a real good volunteer to help/
 
14
Q: When to vote to delete an answer?

roaimaI'm curious to know if there is a particular time to delete - or not delete - an answer that's clearly wrong? Consider the first revision of https://unix.stackexchange.com/revisions/420788/1, which aside from a lack of formatting, contains a fragment of (presumably untested) code. The code attem...

 
1:53 PM
@Kiwy I wonder in what timezone he is in. He must have been really tired...
 
@Kusalananda apparently UK, where it was something like mid day :D
 
I'd consider that a fluke from him.
 
I think we can all agree that then looks so much better when it's on the same line as if though :-P
ducks
 
@Jesse_b that would be a quarrel I leave to devs.
futil and without a proper answer such as where one should write the brace {} in C/C++/Java .....
 
not much to quarrel about, less lines=more better :-)
ducks even further
 
2:00 PM
@Jesse_b heh, the majority of shell scripts can be reduced to a single line (after the shebang)
 
it remind me of a colleague who wrote in java code something like this:
if contition
{
one code line;}
else
one code line;
I use to try to convince him to do a bit more because less is not more
less is unreadable :D
 
@StephenKitt True. I was reading some article the other day about a person that "hacked" some Canadian government site. The site wasn't secured in any way I guess but had a bunch of sensitive data on it so by just guessing the URI's you could access everything
The article said he was able to download all the data from the site using a "simple one liner of code" (likely a loop that should have been more than one line)
 
shebang sounds so much like a lesbian pop rock band name :D
 
I thought the same thing though...basically everything could be one line but it probably shouldn't be
@Kiwy I feel like I'm the only person that says hashbang instead
 
I also say hashbang.
 
2:09 PM
hashbang sounds a lot like a stone raggae band name as well :D
I need to listen to more music but there's only 24h a day
 
I want some hashbrowns now
 
@Jesse_b mmm yes hash browns
 
@Jesse_b I'd do then on its own line if the previous line is too long, or if it was written across several lines.
if condition &&
   condition &&
   condition
then
    thing
fi
I always otherwise put then on the same line as if.
 
once you get to that point it’s tempting to just go for

condition &&
condition &&
condition &&
thing
 
Some for do.
 
2:12 PM
Yeah, I have done that but I normally have a bad habit of allowing really long lines in my scripts
my CTO is a very big stickler for 80 character lines though
 
@StephenKitt Doesn't look good though... Well, it depends what it is.
 
chat formatting /o\
@Kusalananda yeah I agree the if then approach is clearer
it reveals the intention of the code
 
@StephenKitt And work better with else.
 
@Kusalananda that too
 
condition &&
condition &&
condition &&
thing ||
otherthing
 
2:14 PM
No.
 
If any of the conditions fail then otherthing will execute
well I guess that's what you would want though
but even if thing fails it will
 
That would execute otherthing if any of the first things failed, including thing.
 
@Kiwy that’s not equivalent
 
I sometimes do:
 
I knew as soon as written but as everyone was trying to propose horrible wrtting of simple thing
 
2:16 PM
thing && otherthing || echo error
 
if !thing || !otherthing; then echo error; fi
I dunno. condition && condition || thing is perfectly legal. You just need to be aware what it does.
 
@Kusalananda that last one is very sneaky I wouldn't want to review a script with such syntax
 
Actually, thing && otherthing || ! echo error would probably be best. Then you get the correct exit status from the command too.
Unless echo fails ;-)
 
@StephenKitt that the most interesting thing I could find so far about those IO
Someone asking the same thing as me on Stack Overflow (no real answer on how to)
https://stackoverflow.com/questions/10637290/does-rchar-include-read-bytes-proc-pid-io
good explanation IN_MODIFY
https://manybutfinite.com/post/page-cache-the-affair-between-memory-and-files/
Interesting attemp to monitor mmap IO (but fails)
https://serverfault.com/a/546323/131555
but this morning I read an old mailing list that look a lot like someone wanted to patch /proc to improve io count but cant find it in my browsing history
 
@Kusalananda echo can fail, because stdout is not always writable. That's one reason I try to stay away from writing stuff like foo && bar || baz to simulate a ternary conditional operator. Besides being really confusing later (as Kiwy says), it's also very easy to expect that bar can't have a nonzero exit status, and then either sometimes it does or it gets replaced with something else that does.
 
2:30 PM
@Kiwy pretty interesting, indeed
re the last one I think the best approach would be to ftrace filemap_fault
 
@StephenKitt stop helping I will feel obliged to offer you a beer now I know we leave in the same town :D
 
@Kiwy ha ha
that could be fun
 
that could possibly happen
Is there anyone on the site that sometime revisite question to retag them because most of the question do not depend on a linux flavour but it usually more how to use command which is not OS dependent but more gnu or not
 
@Kiwy Gilles and Jeff Schaller do quite a bit of tag editing
 
ok, good someone care about that
 
2:43 PM
Loads of people do that
Or should
 
@terdon yeah, I was highlighting the two that do an awful lot of it (to my knowledge)
 
Indeed.
I actually hadn't realized just how many edits @JeffSchaller has made. Well done Jeff!
 
Gilles: 20147 edits such a machine !
 
A mod casts a spell of summoning
actually @terdon do all your @ mentions summon, or is only the special double @s?
 
@StephenKitt Only the double ones. The rest are normal, just like anyone else's.
 
2:47 PM
Hum being a mod gives you super powers...
interesting
 
@terdon thank you! Just trying to bring a little order to the chaos.
 
@JeffSchaller :)
@Kiwy Just super ping powers.
Mods can always find @waldo.
I was going to write that with two @@, but it turns out there's actually a user with that name.
 
@terdon you mean you don’t get super cow powers? O_O :-P
 
@StephenKitt I asked SE to gimme gimme, but no luck.
 
@StephenKitt I think those with super cow powers are the select few.
 
3:00 PM
 _______________________
< Give me super powers! >
 -----------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
 
Kind of looks like my dog
 
250
Q: What's the story behind Super Cow Powers?

derobertAs we know, apt-get has Super Cow Powers and aptitude does not: $ apt-get --help | grep -i cow This APT has Super Cow Powers. $ aptitude --help | grep -i cow This aptitude does not have Super Cow Powers. and of course, APT has an Easter egg to go with i...

 
@Jesse_b That's the cow made famous by apt/aptitude.
But perhaps you're not familiar with that particular easter egg.
It's quite old.
 
I have seen the cowsay(?) tool you can install
 
@Jesse_b yup
 
3:03 PM
apparently I have it
[jessebutryn]:[~]:{0}
$ which cowsay
/usr/local/bin/cowsay
 
anthony@Watt:~$ fortune -s | cowsay
 _____________________________________
/ It is not a good omen when goldfish \
\ commit suicide.                     /
 -------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
 
It occurs to me that cowsay is a nice (or maybe not-so-nice) way to get around the answer length requirements ;-)
 ________________
< Don't use Kali >
 ----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
5
 
LOL
 
hah
 
when memes collide
 
3:05 PM
Is anyone able to connect to algebraicthunk.net/~dburrows/blog/entry/… ?
 
My Internet connection, and downforeveryoneorjustme.com/algebraicthunk.net, also think it's down.
 
@FaheemMitha's attempt to harvest all our IP addresses seems to have failed... Or he's really stealthy about it.
 
Hmm. Wonder what happened to Daniel.
@derobert Curses. Foiled again.
 
I think I have posted my IP in here before lol
 
3:08 PM
Last I checked, images aren't proxied, so...
 
The thoughts of Daniel Burrows, erstwhile maintainer of Aptitude, on Debian.
You might have read it already.
Well, Debian and free software. Though they are, of course, connected.
I hope Daniel is ok.
It's an oddly depressive post - I'm not sure why he thinks Debian and free software have no value.
But it's certainly true that one of the things the free software community is really bad at, is making contributors feel worthwhile and valued.
Probably countless people across the world use aptitude every day, but never spare a thought to the man who created it.
Debian/Ubuntu is quite big business these days. Hardly marginal.
(The floor is now open to discussion.)
Oh, not to mention corporations like Canonical. I wonder if they so much as bought Daniel a t-shirt. Or maybe a mug?
 
One of the recent easter egg I discover and found amazing was the date gimme gimme gimme a man after midnight
it was quiet amazing
 
@FaheemMitha they offered jobs to most if not all of the core DDs when they started
@Kiwy and one of the highest-scored questions here (if not the highest)
1513
Q: Why does man print "gimme gimme gimme" at 00:30?

Jaroslav KuceraWe've noticed that some of our automatic tests fail when they run at 00:30 but work fine the rest of the day. They fail with the message "gimme gimme gimme" in stderr, which wasn't expected. Why are we getting this output?

 
This occasionally leads to weird situations where this widely used piece of software which is developed by somebody working part time in his basement is discovered to have a bug in it.
@StephenKitt I wonder if they offered Daniel a job. Though in 2004 he might have still been a student.
But I hope you will agree that my main point holds.
 
@StephenKitt that's where I learn about it I'm a bit sad they rmove it from the code, I'm a ABBA fan i found it amazing
 
3:16 PM
@StephenKitt Yes, people like Easter Eggs.
I have a cunning plan. I'll write a piece of software, sprinkle liberally with Easter Eggs, and at judicious intervals ask questions about those Easter Eggs on U&L.
 
@FaheemMitha most definitely
 
@FaheemMitha that is a sick technique to get more rep
 
2021 upvotes? Good grief.
@Kiwy Is sick a compliment? These days, it's hard to be sure.
 
@FaheemMitha it hit Reddit or Hacker News if not both
probably the biggest influx of new Unix.SE users ever (from other SE sites)
 
@StephenKitt I see. People do like ABBA, I know that.
So do I, I suppose.
When I was at Cambridge, one of my fellow undergrads wrote his undergrad thesis (or something like that) on ABBA. He got lots of attention, interviews and so forth.
 
3:20 PM
@FaheemMitha not a compliment nor a mean thing, I just meant it would be terribly complicate to achieve this and it would be awesome to see. I imagine someone as determine to get rep it would show that someone is lacking some selfconfidence IMO :D
 
I heard he then paid so little attention to his studies that he failed his exams. Or maybe didn't sit them. But I forget the details.
@StephenKitt As a DD, has it also been your experience that working on Debian is (to quote Daniel):
> not so much useful as it was worthless self-indulgence with no value to anyone but a small and marginal group of individuals.
?
I guess I need to change my name to Small Marginal. You can call me Small.
 
@Small Marginal I rather be regognize in a small group of marginal persons working in the shadow than being loved by millions of headless zombies because my instagram account is amazing :D
 
@Kiwy Well said.
 
@FaheemMitha it got me my current job ;-)
but I know the feeling
it’s unusual to get feedback from people using your stuff
unless it’s to file bugs
 
@StephenKitt The RH one? But do you think Daniel has a point?
 
3:25 PM
@FaheemMitha yes, he has a point, but it’s a rather extreme view IMO
 
@StephenKitt Glad to hear you think so.
 
because lots of people derive value from Debian as a whole
 
Maybe he was looking for jobs in places where people don't value free software.
 
of course a fair amount of what we end up doing is just self-indulgence
 
Banks come to mind, for example.
Though they probably run Debian too.
People like investment bankers, one can see them thinking that free software developers are suckers.
 
3:26 PM
@FaheemMitha oh they definitely value it
 
@StephenKitt I mean the bankers. Frat boys in suits, that kind of thing.
 
qa.debian.org/popcon.php?package=aptitude ... seems like a lot of people value it. Myself included.
 
@terdon super ping powers still is super in a way... but it won't help me and my evil plan to take over the world
 
@StephenKitt self-indulgence? For example?
@derobert Me too.
@derobert Yes, but maybe Daniel wanted people to pat him on the back, tell him how amazing he was, and buy him drinks. Or the beverage of his choice.
 
3:28 PM
for example
 
@Kiwy don't tempt me :P
 
Actually, I don't really use aptitude. Not much, anyway.
@StephenKitt I'm not sure what the relevance of that is.
 
@FaheemMitha Is there something better now? Primary way I install packages...
 
Oh, did you mean to link to the self-indulgence thing?
 
@FaheemMitha me spending time on that is self-indulgence
@FaheemMitha oops yes sorry
 
3:31 PM
@derobert No. I'm just an old time apt user. As in apt-get and friends.
 
@terdon Sorry hoooo mighty moderator. I shall not bother you any longer with my twaddles
 
I'm sure aptitude is just fine. It looks cool and all.
Though I'm not sure what its current maintenance status is.
Are bugs getting fixed and so forth?
@derobert ^^
 
@FaheemMitha yes, it’s quite active: tracker.debian.org/pkg/aptitude
 
@Kiwy Heh, I was thinking that kicking you from the room would thwart your plans for world domination. Because, of course, there's no world outside SE, right? :P
 
Aptitude has bugs? Been a long time since I ran into one, other than the big known one (it can go crazy trying to resolve complicated package relations)
 
3:34 PM
Not super active. And just Manuel.
 
@terdon Insufficient greybeard density outside unix.se chat to achieve world domination, no doubt.
 
@terdon Hooo in fact I was thinking to take over the whole world except SE, so your position as a moderator is safe be sure about that
 
@Kiwy AH, OK then. I'll take my finger off the trigger.
@derobert s/grey/neck/ :P
 
Why isn't aptitude handled as a native package?
 
(sorry, read that wrong!)
I mean, just think of how bad it'd be if you were about to achieve world domination, but having been thrown off unix.se, you were forced to run Windows. Super-weapon ready to fire and, oh #@(!#, Windows 10 just rebooted for updates. Which 50-50 will break your super-weapon drivers, forcing you to try and roll back, and...
 
3:38 PM
I don't think a super-weapon based on Windows is a good idea.
 
@derobert haha :)
 
@FaheemMitha I don’t think a super-weapon based on computers is a good idea
 
@StephenKitt Agreed.
BTW, has anyone here ever met Daniel Burrows?
 
@derobert well I didn't though about this aspect of my super domintiation of the world, but I was more thinking about no physical violence take over but more like creating a new tamagochi like that would hypnotise all the children on earth and force them to make there parents play with tamagochi like as well ... but still I would need linux ressources to broadcast my hypnosis messages...
 
@StephenKitt And no doubt it'll be connected to the Internet, and the administrator password will be something highly secure, like "4dm!n!5tr4t0r"
 
3:41 PM
@derobert OMG! That's really clever! Easy to remember, and impossible to crack!
 
(which is of course highly secure as it contains letters, numbers, and symbols!)
 
back to the evil drawing board...
I need to become moderator in place of @Terdon and he shouldn't be able to see it coming
@Small Marginal no never
 
Hmm, popcon shows a recent downwards trend in aptitude installations.
 
changes @Kiwy's name to Isnogood
 
@Kiwy <puts on RMS hat>Well, I hope your Tamagochi-like system is free software. I'd hate to think you were not just hypnotizing children, but encouraging the spread of non-free software too!</hat>
 
3:43 PM
Is that a reference to the Evil Grand Vizier?
 
Apparently yes. But it's Isnogoud, I think.
 
Ah, so it is.
I actually read those translated into Greek back in the day
 
@terdon Sounds like something Tolkien would name a tower...
 
ha!
 
3:44 PM
@terdon Of course freesoftware as much as possible, it possible that my hardware will requier some closed source firmware but mehhh..
don't have a choice
Though I enjoy to spend time here. I now shall go on a 4 day weekend doing nothing but drinking beer and hanging with freinds in park. So I wish you a pleasant weekend. And wish you a happy end of day.
PS: Be also sure that my evilish plan wont start tomorrow
see ya !
 
4:13 PM
@Kiwy s/hanging/scheming/; s/friends/co-conspirators/; no doubt ☺ Have fun!
 
 
1 hour later…
5:18 PM
I thought Eric Raymond was the one bent on world domination.
@terdon I read them translated into English, as a child.
But I think only one or two.
Frankly, the Isnogoud comics aren't that interesting. They are pretty one-note.
 
 
3 hours later…
8:02 PM
@terdon And now you're re-reading them in French? ;-)
 

« first day (2757 days earlier)      last day (2194 days later) »