« first day (3145 days earlier)      last day (1802 days later) » 

Tim
11:04 AM
Hi, does any one have reputations on SO to view a deleted post on SO?
thanks in advance
want to retrieve a comment with technical info but now invisible due to deletion of the post by "moderator"
 
12:02 PM
The second question below only has the "centos" tag at the moment. Any thoughts on adding the "hang" tag (ten questions only so far), or some other tag?
3
A: Debian Stretch VM becomes quasi-unresponsive every few days

sourcejedi Assumptions Instructions A dumb hack (which assumes your tasks are hung on filesystem/disk access) 1. Assumptions 1.1) By default, the Linux kernel has code that reports various types of crash or hang. All of them can show the immediate problem and print a call chain on the "local console"...

2
A: Diagnose sudden 100% CPU usage

KiwyWhen I faced similar issue I've created a small script like this (it writes every second the date and list of process running with its CPU and RAM usage): #!/bin/sh while true do date ps faux sleep 1 done >> /a/log/file and I let it run as a background program. This would h...

* I mean should I add the "hang" tag to the second question, do you think?
 
12:51 PM
@sourcejedi yes, it would also highlight the fact that this is a hang and not “just” 100% CPU as the title suggests
 
 
1 hour later…
2:10 PM
@StephenKitt oh, don't worry, I realized that as I asked here & I already fixed the title :-)
 
@sourcejedi ah yes indeed, that’s better still, a self-sufficient title is preferable to one which needs tags
 
@StephenKitt Nothing worse than a non-specific subject line :-).
 
“I have a problem”
 
I thought "hang" was less used than it was, there's 28 questions.
Cant work out where I got the 10 figure from
 
base 28? :-P
 
2:22 PM
Ho I now understand how I get 2 upvote for a small interest question
 
2:50 PM
@StephenKitt "I have a doubt"
 
 
1 hour later…
4:14 PM
So, general programming question, but relevant to Unix/Linux.
In a programming language, one may from time to time want to execute "system" commands. Which typically involve calling external programs.
My question, which I suppose is Unix-specific, somewhat, is...
Assuming the programs are called from the "command line", what governs whether they are called from a "shell" environment.
This would be particularly relevant if one is trying to call, say, a shell builtin.
 
@FaheemMitha what governs that is the function you call...
For example in C, system calls a shell, other exec functions don’t.
 
@StephenKitt So some functions call a shell, and others don't? How can you figure out which do and which don't?
 
@FaheemMitha you read the documentation.
 
Assuming it isn't documented, of course. Or even if it is, and you choose not to believe the documentation.
@StephenKitt I'm looking at the Lua documentation. It isn't clear.
Though perhaps in the absence of a mention of a shell, one should assume it isn't shelling out?
 
@FaheemMitha for os.execute()? What’s not clear about “It passes command to be executed by an operating system shell.”?
 
4:23 PM
@StephenKitt io.open, actually.
Though someone pointed me to the code, and it doesn't look like it does.
What's involved at the level of system calls in shelling out?
 
@FaheemMitha but that doesn’t execute anything...
 
@StephenKitt io.popen, sorry.
I assume you're looking at lua.org/manual/5.3/manual.html#pdf-os.execute too
 
@FaheemMitha ah, OK, that isn’t clear, indeed. If it’s similar to the C popen function then it does involve a shell.
@FaheemMitha yes.
 
> Starts program prog in a separated process and returns a file handle that you can use to read data from this program (if mode is "r", the default) or to write data to this program (if mode is "w").
Though LuaTeX is using 5.2, and therefore, so am I.
So popen is calling libc's popen, and execute is calling libc's system.
So, just C calls.
 
@FaheemMitha probably, yes.
 
 
1 hour later…
5:54 PM
I'm sure this has an obvious explanation, but why isn't grep reporting the name of the matched file(s) here?
faheem@orwell:~/test-latex$ grep -R sqlite  *.sh
#sqlite3 iris.db '.header on'
#sqlite3 iris.db '.mode column'
sqlite3 iris.db '.mode tabs' '.import iris.txt iris' '.exit'
#sqlite3 testtab.db '.mode tabs' '.import testtab.txt testtab' '.exit'
 
6:13 PM
@FaheemMitha if you have only one file that matches *.sh, then grep would only see the one file and not bother printing the filename
 
@JeffSchaller Oh. Huh. I must not have noticed that before. Not optimal, though.
 
@FaheemMitha try adding -H to your grep
 
@JeffSchaller Ok
 
6:31 PM
Yes, -H works. How did I not notice this before?
 
6:42 PM
@FaheemMitha because there's a billion options for grep, and a billion commands besides grep and ... well, you've never needed it before? Just guessing :)
 
@JeffSchaller I just never noticed, I guess.
 
hey so for my ubuntu machine I had a crash, but the notification didn't allow me to copy all the details to the clipboard, so I only have screen shots, is the an open source optical scan text recog package for Linux?
i was certain the processing.org had one in their example library, so i guess i could download that for Linux have a go with that, its just that there are a lot of fields in the report i want to keep for learning what they all mean, and its going to be a mammoth annoyance to type it all out by hand from the screen shots
 
6:58 PM
@Adam There is OCR software, yes. E.g. tesseract.
It's terrible on anything but clearly typed text.
It does really well with TeX, for example.
 
oh fantastic no fortunately its all black standard text with a white background, but annoyingly i was about to select the text in each field, but unable to copy it to the clipboard but if this works for clearly typed text it should be perfect thanks
but python language certainly seems like something i will have to learn, so many references to it in the crash details, the actual commands for which didn't even involve python as far as i was aware
 
7:40 PM
interestingly, this kali distribution that supposedly meant to be the be all and end all hasn't been much use to me in the way of learning about Linux. They have restricted use of the tor browser running as root, why?
also was redirected to a fake tor project website when attempting to download it, had to put the proper address in manually because the browser provided kept directing me to another website, it says its firefox, but it looks like the one for mac computers lol
its not possible an entire Linux distribution would be made satirically for all the wannabe instant hackers out there is it? it feels satirical and was marketed to appeal to lame people but maybe im just being an asshole. there was a guy with a hoodie and a devious grin on the download promo so i find that satirical
i do like the desktop layout though that is really neat, like how you can have multiple desktops and select one appropriate, that's very user friendly i think
redhat and mint, are these open source?
@FaheemMitha sorry tesseract isn't found in what ive got thus far in my sources.list file, what do i need to add?
 
7:58 PM
@Adam What distribution are you using?
In any case, do apt-cache search tesseract.
The command line tool is tesseract-ocr. There's also python3-tesserocr
 
well the main one I've been working with is Ubuntu LTS 18.04
 
@Adam That should work. It's probably a bit out of date.
 
yeah i got a long list of hits using the command you mentioned, but it still says it cannot find the package when i use sudo apt-get install tesseract4
sorry, still haven't got around to working out how to allow the clipboard from my VMs to be pasted in my host machine's window, but this is the screenshot
 
@Adam Why are you trying to install tesseract4? There's no such package. There's a libtesseract4, though.
I'd install tesseract-ocr to start with.
If you using Python, you could try the Python package.
 
8:13 PM
@FaheemMitha well the list from the apt-cache search stated that to be the name of the OCR library of tools but yep thanks tesseract-ocr is installing now
 
@Adam I don't see it.
 
@FaheemMitha it's ok ive been able to install tesseract-ocr
lol I feel as if the monopoly they have had in the social media market is damning enough but interesting read gmx.com/technology/…
 
@Kiwy I only upvoted you after PhilipCouling suggested it could be a fork-bomb :). When I read questions like that, I like to see a bit of explanation e.g. that 100% CPU condition would not always cause this problem, but e.g. maybe it would if there were 100,000 CPU hog processes. And I did not follow your explanation about why ESX disk lags could show up as high CPU usage.
 
This isn't really on topic, but does anyone know how to force a popen to complete? Technically it's Lua, but the io.popen command is apparently just a wrapper around the libc popen.
It's a bit annoying.
Closing the file object does the trick, apparently. Thankfully.
Hands up everyone who thinks programming is annoying.
 
8:52 PM
from the bash, if we have a variable named string, and want to output only the numeric characters it contains, we use ${string//[!0-9]/}, what must I add to this to include a list of delimiters such as the comma?
 
9:28 PM
@Adam ${string//[!0-9,]/}
 
ok thanks I am actually reading the bash manual to get the general idea btw and I'm writing something up in maple that will help a lot, it's really core concepts missing in my understanding that were probably taught to others in high school computing classes that's holding me back I think
 
Hey @Kusalananda. How goes it?
 
9:48 PM
@Adam I never took a "computing class" in high school :-(
@FaheemMitha Had a week off from work. I had too many days of accumulated leave.
Weather is getting pleasant over here. Around 20-22 degrees C. Spring has officially given up to summer.
 
@Kusalananda I've never taken a computing class ever.
 
I'm hoping it won't get much warmer than 25 C later. Last year, with a month of 30+, was crazy.
 
@Kusalananda That's nice. Good time for walks.
 
@FaheemMitha It is, but I have too many small private projects...
 
@Kusalananda One needs to make time for the important things too.
@Kusalananda If you think 30+ is crazy, you really wouldn't enjoy it here.
 
9:54 PM
@sourcejedi Well CPU alone is not really a good measure to simply evaluate the responsivness of your system. In this case load is usually a way better value to look at. If for any reason a disk become unresponsive, and your application is working with strong IO, the load could increase dramatically while the CPU usage doesn't really increase. That would lead to huge load with poor CPU usage. And this could in the end lead to completely unresponsive system.
However I misexplained it and use CPU for load, which is confusing indeed.
 
@FaheemMitha I know :-)
 
You should get yourself a horse, like JennyD.
 
@FaheemMitha It's about the most expensive "pet" you can have though....
And I remember her saying that she actually had issues finding food for it during last summer's heat-wave.
We're not used to prolonged periods of that sort of heat.
The farmers had to emergency slaughter sheep and other animals.
Oh well, time to upgrade my macOS systems.
 
with the wc command, how do you suppress the filename from the end of the output, so for wc -c filename the output is the byte count followed by filename, I only want it's byte count as I need to store it as an integer variable
@FaheemMitha horseman get a horseman they are the value of a man and a horse combined
 
@Kusalananda Yes, I'm sure they are expensive.
@Adam Huh?
 
10:05 PM
@Kusalananda ok well what I was trying to get at is I always miss obvious things that come second nature to others, a hypothetical computing class was a nicer way of putting it :-(
 
@Adam Make wc read from its standard input. wc -c <file.
 
ah ok got it thanks
 
If you want the size of a file, use stat instead. That would not requiring reading the whole file.
 
interesting how does it do that
`?
 
@Adam If you wanted to take a computing class, you could.
Presumably.
If wonder how many computing classes the other people here have taken.
BTW, random trivia question. Does anyone here buy computer books any longer? I stopped quite a while back. I bought "Practical Common Lisp" in 2005. That was actually a good buy.
But CL is kind of a special case.
 
10:18 PM
@Adam How stat gets the size? It's part of the file's meta data.
If it wasn't, ls -l would take ages to run.
... depending on the size of the files in the directory.
... just to display the file sizes.
 
10:36 PM
ok this concept of meta data is entirely new to me
So perhaps the explanation would take an unreasonable length of your time I think. ill have to do yet more reading it seems
 
11:03 PM
@Adam "meta data", in general, refers to information about data. File meta data is data that is not actually part of the contents of the file but stored in the file's directory entry. This includes its size, its various timestamps, and its name.
Oh, and permissions and ownership etc. too of course.
 
On the meaning of "meta", generally
 
@Kusalananda yeah thanks I've been reading the wiki page on it, essentially data about data great all I need is a new reason to fall into infinite regress
@MichaelHomer thanks yeah basically my current understanding summed up
hmmm im feeling especially uncomfortable with the term e-Government
 
11:51 PM
i don't understand this i am entering string=$(ls -1sm)
and ${string//[!0-9,]/} always ends with :command not found
: command not found
sorruy
the output of ${string//[!0-9,]/} i mean
 
@MichaelHomer I think we have a fan of British comedy.
 

« first day (3145 days earlier)      last day (1802 days later) »