topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday April 25, 2024, 6:34 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DoXiD [ switch to compact view ]

Pages: [1]
1
Yea at the moment this project only works for local printers (as you understand, networkprinters on remote sites also counts as local) :)
I'm actually heading for usage tracking and report errors on the fly.

Cool. Now for the errors, are you looking for communication errors (getting the job there), machine errors (printer out of something /jammed), or both?
Originally my plan was to just follow the communication errors from the PC (client) to the printer, once there the printer is a whole nother story, but when you mention it i could probably get that up on my todo list, getting the printer errors as well.

These days (with direct IP printing so common/cheap) print servers seem to only get used for user usage tracking scenario. However most of the (driver/spool interrogation level) ones I've tested have great difficulty tracking duplexed pages, multiple copies, and the larger paper sizes (like 11x17) that can make a big difference when calculating someones actual usage.

Then there are the printers that locally store the by user usage tracking info... Which is great if you want to pole for it constantly to avoid missing something (not recommended) because they dump the logs when restarted.

Only thing I found that will guarantee-ably accurately catch everything sent to a printer is Capella Megatrack. Which is an accessory firmware add-on that sits on the printer and reports back to a SQL db. At the time I had investigated the options available, including a scratch write ... but decided the best thing for the company was to recommend the client go with Capella (which ain't cheap). The deployment has been running just fine for the last (almost) 5 years.

Please understand, I'm not trying to talk you out of the project. I really and truly hope you succeed ... I'm just sharing the fact that I couldn't quite pull it off.
I understand, no worries :) i find it better to know what i'm getting myself into but i myself always live by the motto "you can do anything, don't let nobody tell you otherwise, nothing is impossible" and i firmly beleave that there's no problem that can't be solved, the only question is who will come up with the answer :)

I'm looking in to the direct IP (TCP) printing as we speek, mainly this idiotic function:
"Output is transmitted directly to the printer without staging or respooling, saving system resources and enhancing print routing performance."
Sure it's a performance saver perhaps, but for a sys admin not in charge of the "pre-spool" server (Streamserve) it's really hard to debug anything cause the document that you print is just that, a TCP connection and nothing else, there's no spooled documents and no indication of what's getting printed. Love that the feature excists but there has to be more info in this area :)

Atm I've bumped into some problems regarding the network printers, seems like they don't spool documents as they should when they come from a second "printer" server running a software called "Streamserve" :/

I'm not familiar with that one, but I have seen some Novell print servers that would convert the print job on-the-fly from RAW/9100 (what you'd expect) to LPR/LPD 515 ... Which strangely was the root cause for many rather interesting failures. Like a 500 page job that kept reprinting the first 150 pages in a loop until the machine ran out of paper.
Hehe, i'm glad that we don't have novell here at all, we purged that system years ago.
Altho now we're left with Windows default things which is nice cause i can run API against them all but as mentioned, windows ain't to keen on spitting out logs or debug info.

Yours is more of a scanner then a job-information tool o guess even if yours had a few information features such as printer toner levels etc. Have you developed yours entirely from scratch cause it looks like you were surprised that "web access" was in your feature list? :P
What's it written in? C# or .NET?

Yes, Page Countster's primary function is to find and list all of the printers on a network and collect page count and tracking information for billing purposes. I'm not sure what you're referring to regarding the "surprised that "web access" was in your feature list" part. But if you can link me to the statement I'll have a better chance of answering.
http://www.youtube.com/watch?v=plLrAZrvq3I
1min 41sec into the video:
"i did wanna show you one thing tho that suprised me quite a bit, which was that i didn't even realize that my printer could be accessed and configured through the web" (think it's you in the video? or is that mauser?).

At any rate, yes it was a from scratch project, that occupied a great deal of my time for about 3 years. It is written in pure Win32 API C++ (no .NET/MFC/run-time requirement nonsense) using MSVS2005.
Cool, havn't been here long enough perhaps but i havn't seen many projects that doesn't involve PHP or "simple" programming, not yet at least, except yours.
Gotta hand it to you for making such a in-depth project with packet forging/managing etc :)

2
Yea at the moment this project only works for local printers (as you understand, networkprinters on remote sites also counts as local) :)
I'm actually heading for usage tracking and report errors on the fly.
This is mostly developed due to the lack of information given by windows when customers call in and say that their printouts never show up in the printer, this way i can track where, why and when :)

Atm i've bumped into some problems regarding the network printers, seems like they don't spool documents as they should when they come from a second "printer" server running a software called "Streamserve" :/



Yours is more of a scanner then a job-information tool o guess even if yours had a few information features such as printer toner levels etc. Have you developed yours entirely from scratch cause it looks like you were suprised that "web access" was in your feature list? :P

What's it written in? C# or .NET?

3
Hi!

first off, This application is intended as a tool to gather printer information quickly, not in-depth hard core debugging of bits and bytes.
Secondly, you will need Python for this to work, i will not compile this application cause it's constantly developed and changed.
Thirdly, i cannot be held responsible for anything this code does or be demanded to support it, i will release it as is and give out assistance here in meens of time for free.
(i know the code ain't perfect, and there's probably better tools for this, but this is a light-weight, fast and flexible way to debug information about the printer and it's documents)

The software is released under the original BSD Licens: http://www.openbsd.org/policy.html
The software also requires the library "pywin32": http://sourceforge.n...win32/files/pywin32/

(There are plans to evolve this software to actually dig into the printer and fetch information)

Code: Python [Select]
  1. __author__ = "Anton Hvornum"
  2. __copyright__ = "Copyright 2011, Anton Hvornum under the BSD License"
  3. __credits__ = ["Anton Hvornum"]
  4. __license__ = "BSD License (Original)"
  5. __version__ = "0.0.1"
  6. __maintainer__ = "Anton Hvornum"
  7. __email__ = "[email protected]"
  8. __status__ = "Alpha"
  9.  
  10. import win32print, os
  11.  
  12. wp = win32print
  13. printer_types = [(wp.PRINTER_ENUM_SHARED, 'shared'), (wp.PRINTER_ENUM_LOCAL, 'local'), (wp.PRINTER_ENUM_CONNECTIONS, 'network')]
  14.  
  15. print_directory = wp.GetPrintProcessorDirectory()
  16. if not 'printers' in print_directory:
  17.         print_directory = os.path.normpath(print_directory + '/../../PRINTERS')
  18.  
  19. def get_printer(name = '*'):
  20.         printer_list = {}
  21.         for printer_type in printer_types:
  22.                 print printer_type
  23.                 for printer in win32print.EnumPrinters(printer_type[0],None,1):
  24.                         if name == '*':
  25.                                 printer_list[printer] = win32print.OpenPrinter(printer[2])
  26.                         elif name.lower() in printer[2].lower():
  27.                                 printer_list[printer] = win32print.OpenPrinter(printer[2])
  28.         return printer_list
  29.  
  30. def GetJobList(printer):
  31.         printer_handle = win32print.OpenPrinter(printer)
  32.  
  33.         job_list = win32print.EnumJobs(printer_handle,0,-1,2)
  34.         win32print.ClosePrinter(printer_handle)
  35.  
  36.         return job_list
  37.  
  38. def getJobDetail(printer, id):
  39.         printer_handle = win32print.OpenPrinter(printer)
  40.  
  41.         job_detail = win32print.GetJob(printer_handle,id,2)
  42.         win32print.ClosePrinter(printer_handle)
  43.  
  44.         return job_detail
  45.  
  46. printer_list = get_printer(raw_input('Name of the printer you\'re looking for (blank or * for all): '))
  47.  
  48. for printer in printer_list:
  49.         print 'Joblist for:',printer
  50.         for job in GetJobList(printer[2]):
  51.                 if 'JobId' in job:
  52.                         job_detail = getJobDetail(printer[2], job['JobId'])
  53.                         if not 'file_path' in job_detail:
  54.                                 job_str = '00000'
  55.                                 job_str = job_str[:-len(str(job_detail['JobId']))] + str(job_detail['JobId'])
  56.  
  57.                                 shd_file = os.path.join(str(print_directory), job_str + '.SHD')
  58.                                 spl_file = os.path.join(str(print_directory), job_str + '.SPL')
  59.  
  60.                                 print shd_file
  61.                                 print spl_file
  62.  
  63.                                 if os.path.isfile(shd_file) and os.path.isfile(spl_file):
  64.                                         job_detail['file_path'] = os.path.join(str(print_directory), str(job_detail['JobId']))
  65.                                 else:
  66.                                         job_detail['file_path'] = str(print_directory)
  67.                         for key in job_detail:
  68.                                 print '\t', key, '::', job_detal[key]
  69.                 print ''

4
Mircryption / Re: Blowssi - Perl v5.10.1 - 2/3 subtests failed
« on: April 19, 2011, 01:12 AM »
Wow, everything i've learned, i've learned from trynig things without reading up on it first.
This has given me a hughe advantage in trying to find solutions on problems when it comes to computers..

But i couldn't even try a simple thing such as just skipping the test :P
Gothi[c], you were right, i got away with just running "make" -> "make install" :)

Thank you for this, i honestly don't think i would have solved it due to lack of brainfunction on my part ^^

5
Mircryption / Blowssi - Perl v5.10.1 - 2/3 subtests failed
« on: April 18, 2011, 02:42 PM »
Hi.

I'm having some issues building blowssi and tbh, i'm no wizzard with Perl.
This is all the information i have and i can only hope for some help here:

OS: Xubuntu 10.10
Perl: v5.10.1
Blowssi: v0.2.0
running as root just to be extra clear here..


This is what i get from "make test" on Crypt-ircDH1080-0.01:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Crypt-ircDH1080.t .. 1/2
#   Failed test at t/Crypt-ircDH1080.t line 21.
# Looks like you planned 2 tests but ran 3.
# Looks like you failed 1 test of 3 run.
t/Crypt-ircDH1080.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests

Test Summary Report
-------------------
t/Crypt-ircDH1080.t (Wstat: 256 Tests: 3 Failed: 2)
  Failed tests:  2-3
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 2 tests but ran 3.
Files=1, Tests=3,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.15 cusr  0.00 csys =  0.17 CPU)
Result: FAIL
Failed 1/1 test programs. 2/3 subtests failed.
make: *** [test_dynamic] Error 1

I ran into some issues with a lot of libraries, like Crypt::Random, doesn't excist in my distro aparently so i took some help from #perl and they gave me these instructions:
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
cpanm -S Crypt::Random
That did the trick for that module, had some others but i simply replaced the dashes in the error message with :: and tried:
cpanm -S <Module::Thing::here> and it worked, and i got this faar.


I'll supply any details you need, i can rerun the entire command history just to get this working tbh.
I'm just so new to Perl so i don't really know what you expect when you debug, if you'd be using Python, C++, C# you name it i'd probably be of more use, so, if you need any info at all, poke me! i'll probably hang around irc for some time hoping for an answer (nick on efnet is Torxed tho)


Thank you in advance from the bottom of my heart!

Pages: [1]