Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-10-2010, 02:49 PM
|
#1
|
Member
Registered: Aug 2009
Location: Houston
Distribution: Slackware 13.37 x64
Posts: 105
Rep:
|
Dear friends at LQ, I have a simple question(really!)
I want to have a errors from any program I'm running dumped to a console (errors in kernel, errors in inetd, or what have you).
The reason is - Error messages help me learn. How do I overwhelm myself with debugging information?
|
|
|
04-10-2010, 02:58 PM
|
#2
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Hi,
One option would be to tail the log files of the various programs. I think that would be the simplest since you wouldn't have to change any config. If you use tail -f then you can 'follow' what gets written to the logs.
If you're talking about programs you start manually that don't have a log assigned to it, the see if you can run it with -v option (verbose). That prints out lots of information too if available.
Kind regards,
Eric
|
|
|
04-11-2010, 01:57 PM
|
#3
|
Member
Registered: Aug 2009
Location: Houston
Distribution: Slackware 13.37 x64
Posts: 105
Original Poster
Rep:
|
I don't mind changing configs at all. I'm actually doing this, in-part, to locate all the config files.
In the /etc/syslog.conf file I found this line -
Quote:
# Uncomment this to see kernel messages on the console.
#kern.*
|
which will print kernel messages in the console when they're generated. The cool part about this feature is -
When I write a program that overruns array boundaries, I get kernel messages stating the where and the what just screwed up. I'm looking for more of that. (so that no matter what error happened, I get to read about it.)
I'm going to write a shell script to tail all the log files, but I really was hoping for more real-time reporting, such as the kernel message example.
I'd also love to be able to step through the execution of the kernel with a debugger.
|
|
|
04-11-2010, 02:22 PM
|
#4
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
Quote:
Originally Posted by Dogs
I don't mind changing configs at all. I'm actually doing this, in-part, to locate all the config files.
In the /etc/syslog.conf file I found this line -
|
The problem is that there are many ways to log info. Most *nix programs will use the syslog facilities, in that case it should be simple to get their logs just by correctly configuring the relevant programs and/or the system logger.
Quote:
I'm going to write a shell script to tail all the log files, but I really was hoping for more real-time reporting, such as the kernel message example.
|
Not sure what do you mean. "tail -f" is as real time as your kernel can get, meaning that any change to a given log file which is being tailed with -f will be printed as soon as the tail tool perceives the change in the file, which virtually means "instantly".
Just fire up "tail -f /var/log/messages" in xterm to see what I mean. As soon as a new kernel message is generated it should be printed to that xterm window.
Quote:
I'd also love to be able to step through the execution of the kernel with a debugger.
|
Kernel debugging is not a trivial thing, and it needs support on the kernel side which must be enabled before you compile it. The kind of options you'll need to turn on will depend on what exactly do you want to debug inside the kernel, and I am not the most adequate person to give you advice about that.
For this one you should better ask in the kernel subforum.
|
|
|
04-11-2010, 05:28 PM
|
#5
|
Member
Registered: Aug 2009
Location: Houston
Distribution: Slackware 13.37 x64
Posts: 105
Original Poster
Rep:
|
I guess what I really want to do is watch how the system works. I want to see step-by-step what the PC is doing, what problems it is having, how it is handling those problems, and in what file it found the instructions in.
|
|
|
04-11-2010, 05:59 PM
|
#6
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
Quote:
Originally Posted by Dogs
I guess what I really want to do is watch how the system works. I want to see step-by-step what the PC is doing, what problems it is having, how it is handling those problems, and in what file it found the instructions in.
|
Not a trivial task.
To see how the pieces fit together you should start by rolling your own using Gentoo or Linux From Scratch.
To see where is configured a given program and how it logs you should be reading the documentation for that given program, since each one is different. As said, most of them will use the system logger, but in a regular desktop system nowadays you can find from many hundreds to many thousands of different packages, each one coming from a different source and author.
The same applies for the place where they take the info from (may it be configuration info, input data or whatever you mean, it's all usually described in the documentation for each program).
|
|
|
04-12-2010, 12:45 AM
|
#7
|
Member
Registered: Aug 2009
Location: Houston
Distribution: Slackware 13.37 x64
Posts: 105
Original Poster
Rep:
|
I think I'll give LFS a shot. I've spent the last few days on my laptop which I only installed select packages from a, ap, d, e, f, k, and l. It is easier to learn about Linux when there isn't quite so much of it.
The thing that would make me happiest would be to manually create a connection to the internet with a wireless card.
|
|
|
04-12-2010, 01:24 AM
|
#8
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Quote:
Originally Posted by Dogs
The thing that would make me happiest would be to manually create a connection to the internet with a wireless card.
|
Hi,
Look into
for that. You can set up wireless connection from the commandline with that command.
Kind regards,
Eric
|
|
|
04-12-2010, 02:18 AM
|
#9
|
Member
Registered: Aug 2009
Location: Houston
Distribution: Slackware 13.37 x64
Posts: 105
Original Poster
Rep:
|
Quote:
Originally Posted by EricTRA
Hi,
Look into
for that. You can set up wireless connection from the commandline with that command.
Kind regards,
Eric
|
How? The commands I've tried with iwconfig haven't had much use.
The only way I've been able to get online is to configure wpa_supplicant.conf, and run the daemon each time I want to connect to the internet. It works fairly well, though. I get online in < 3 seconds so there is no performance loss anyhow.
or
instead of doing iwconfig wlan0 essid xxxxx ap xx:xx:xx:xx:xx
I do
(in a script "wpa")
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
^^this command won't get me an IP address, but will associate with
an access point.
then
dhcpcd wlan0
^^will get an IP address
then I have access to the net. What else could I be doing?
When I try to do that with an iwconfig command I don't get any feedback and nothing ever changes.
ETA- by "Manually create a wireless connection" I mean install and configure all the components that allow the internet to work on my PC. From the kernel drivers to the web browser. I've already done the newbie install on slackware 12.2 and 13 more than a few times, and made an effort to understand what each of those packages was for, and whether or not I needed it, so I don't expect something like LFS to be surprising in any way.
P.S. -> Newbie mode does not take exactly 1 year. It takes exactly 4 and a half hours at a casual pace.
Last edited by Dogs; 04-12-2010 at 02:24 AM.
|
|
|
All times are GMT -5. The time now is 11:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|