[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Hey, I really need some help right now, trying to find a fucking

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 28
Thread images: 2

File: 1478026564422.png (51KB, 657x527px) Image search: [Google]
1478026564422.png
51KB, 657x527px
Hey, I really need some help right now, trying to find a fucking error that keeps escaping, I keep only getting half the error because it's so large whenever I visit the screen. My VPS is running CentOS and I cannot for the life of me figure out how to fucking make it log the screen specifically, it says using Ctrl-A + H will start logging the screen but I get no message and I can't find the god damn log file. This is driving me nuts, I'm only using linux to save cash. Please, be merciful, help me. Happy new year.
>>
bump hitler
>>
Tell us more, when do you get the error? When you boot the machine? When you run some command? At random?

Almost all logfiles are located under /var/log directory and its sub-directories on Linux
>>
>>58254530
Did you try dmesg?
>>
>>58254592
No it's an error relating to the java program I'm running and basically I need to log the screen session so I can view it later and have the entire error. Is there anyway I can do this? Which folder would it be generated in? Is it perhaps possible to add a -log or something when I first start the session? I'm seriously lost...
>>
>>58254601
I don't think dmesg would work because by the time I reconnect the screen only shows a portion I doubt it'll have the entire log, but I'll be sure to try it the next time I see a part of the error, thank you very much for your input.
>>
>>58254603
when you run it from the command line then write:

$ ./your-java-prog 2> filename.txt

when you run your-java-prog (what ever that is) then the error will be put into filename.txt
>>
>>58254616
/var/log/messages
>>
>>58254603
~/.bash_history
>>
>>58254741
How do I open the command line on the screen?
>>
File: no command line.png (6KB, 641x83px) Image search: [Google]
no command line.png
6KB, 641x83px
>>58254792
>>58254741
>>
>>58254792
What do you mean?

you can open the terminal in the menu or use ALT + F2 and type gnome-terminal as the command to run it.
>>
>>58254813
See the image I posted, I'm in the screen where my java program is running but I can't open the command line to enter logger.txt, Can i do it from another screen by referencing the screen I need logged? Like
>screenid logger.txt
>>
>>58254830
You need to do it BEFORE you run your java program... or in other words run your java program from the command line with the "2> filename.txt" command after it.
>>
>>58254850
So just to triple check, it'd be like
>screen sh run.sh filename.txt
Correct?
>>
>>58254868
No... But rather

>screen sh run.sh 2> filename.txt
>>
tell me if this works
>>
>>58254876
>>58254889
It works! Thank you so much, so so so much, so so so so so so so so so much! It created a text document and I suppose it'll start logging now. FINALLY!!! Is there any other info you think I should know about this logging method?
>>
>>58254905
>>58254889
Also, will it only update the txt file when the screen is terminated?
>>
>>58254905
I am pretty sure it will create a new file every time... If you want to ADD or in other words append to the file then you need to put "2>>" instead of "2>"

>>58254915
I think so, yes... I am not sure... I have only done this on small scripts that terminate fast .
>>
>>58254923
So if I terminate it manually will it still log? Like if I run the command line (like this)
>screen -X -S screenId quit
as I usually do, it'll generate it? My program doesn't terminate automatically.
>>
>>58254530
Are you using putty? Just log all output to a file
>>
>>58254960
Yes, I am. How do I do that?
>>
>>58254949
I am not sure to be honest. But it should save any error message to the file, and it's designed for software that don't behave properly. So should be fine to end it any way you want.
>>
>>58254965
Right click and go to properties > logging > log everything to file
Something like that I'm on my phone right now
>>
>>58254978
>>58254973
Alright, thank you both very much for your help. You really really really have made my night, I'm finally gonna go have some sleep, I hope you both have a great new year. Take care anons.
>>
>>58254985
All the best xxx
>>
>>58254985
You too!

I am sure next time it might be easier for you to ask on some IRC (maybe #linux or #centos on freenode).
Thread posts: 28
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.