LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-12-2013, 10:25 AM   #1
systemlordanubis
Member
 
Registered: Jun 2010
Distribution: Debian, Ubuntu, Win
Posts: 143

Rep: Reputation: 16
Where to find error messages for tc?


Hi All,

I'm having a strange situation where it appears that some 'tc class' replace/add commands being run by a script are not actually taking place; and when the script later wants to remove these classes, it dies because the classes don't exist.

The strangest thing is that if I run the commands manually, there's no error and as far as I can tell, it happens at random.

Is there somewhere I can see errors that may be logged by tc? The script is not reporting any error when it tries to add the class; tc simply replies with an empty response; indicating success.

Any thoughts welcome.

Thanks
Anubis.
 
Old 03-12-2013, 12:12 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143
Have you tried checking the exit status of tc with "$?" ?

No response doesn't necessarily mean it was successful.
 
Old 03-17-2013, 10:17 PM   #3
systemlordanubis
Member
 
Registered: Jun 2010
Distribution: Debian, Ubuntu, Win
Posts: 143

Original Poster
Rep: Reputation: 16
Hi Suicidaleggroll,

Thanks for the reply; upon deeper investigation this seems to be a 'hiccup' in tc.

Looking back through the processing logs, the first attempt which returns the 'RTNETLINK answers: No such file or directory' exits leaving the rest of my script triggers in place; at a later time a few minutes later the attempts to process the removal again and this time it goes through successfully!

So, the issue seems to be some kind of read error when processing the deletion of the tc records.

I am using a locking mechanism on all my scripts to ensure that only one script is modifying tc at any one time, so I don't think it should be an overwriting problem, but I'm not sure what else could be causing this issue?

I did try what you suggested to check $?, but this returns 0 on each tc rule insertion.

Thanks
Anubis.
 
Old 03-17-2013, 10:59 PM   #4
systemlordanubis
Member
 
Registered: Jun 2010
Distribution: Debian, Ubuntu, Win
Posts: 143

Original Poster
Rep: Reputation: 16
Hi Suicidaleggroll,

Thanks very much for your help; upon even further investigation and the fortunate luck of catching an issue as it happens, I've located the problem to a locking issue whereby another process was able to utilize the same class identifier when it shouldn't have.

Many thanks for your assistance.
Anubis.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Small bash script to find 'error' in /var/log/messages rolypoly Programming 3 10-28-2008 08:55 AM
How to find replies to my messages zenmike LQ Suggestions & Feedback 5 05-16-2008 02:38 PM
Postfix: User messages are okay; but error messages themselves seem to be bouncing jgombos Linux - Server 3 03-03-2007 02:21 PM
From where am i getting error messages to /var/log/messages? prabhuacsp Programming 3 02-16-2005 08:59 AM
From where am i getting error messages to /var/log/messages? prabhuacsp Linux - Networking 1 02-16-2005 12:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration