LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-29-2008, 09:28 AM   #1
chiragshah
LQ Newbie
 
Registered: Nov 2008
Posts: 8

Rep: Reputation: 0
How to read print status file in embedded linux


Hi All,
I am writing a C code to print a .bmp file from my ARM based embedded system. I want to continuously monitor printer queue and its status. I am having monta vista linux and its having cups support.

Which file i should read for continuous status monitoring for printer status? (like.. queue has job No abc, queue is empty, printer is ready). I know the lpc and lpq command can serve the same but i don't want to read any command's o/p and do string operation on that. I want to read status file directly to avoid such string operations.

Regards,
Chirag Shah
 
Old 12-31-2008, 01:16 AM   #2
gankoji
Member
 
Registered: Nov 2007
Location: Southern California
Distribution: Slackware-13.0 x86_64, Slackware 12.2, slackware64-current
Posts: 225

Rep: Reputation: 35
if you're interested in getting real-time data, you can examine on some regular basis the /proc/sys/dev file tree. This is where the kernel constantly outputs status updates on all devices that it keeps track of. This is most likely where your printer's raw status data will be kept. Cheers!
 
  


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
LXer: Novell vs. Red Hat: Read the Linux Fine Print LXer Syndicated Linux News 0 11-25-2008 06:50 AM
Print-to-file print driver to print PDF Bill Fox Linux - General 3 05-02-2006 05:15 PM
Writing to an read-only embedded linux system!! cheema Linux - General 1 01-26-2005 05:20 PM
adsl-status can't read pppoe PID file with rp-pppoe program setup Smarvy Linux - Newbie 2 03-14-2004 12:35 AM


All times are GMT -5. The time now is 06:30 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration