LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to read print status file in embedded linux (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-read-print-status-file-in-embedded-linux-693642/)

chiragshah 12-29-2008 08:28 AM

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

gankoji 12-31-2008 12:16 AM

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!


All times are GMT -5. The time now is 02:58 AM.