m1k3r
Members-
Posts
34 -
Joined
-
Last visited
Reputation
25 ExcellentAbout m1k3r

-
HTML file calls the python script. The apache server is configured to use Python as CGI. It uses the jQuery load function to fetch the html output from the Python script and adds it onto the #content div. MFD Status Page <br /> $().ready( function() {<br /> $("#content").load("http://your-address.co.uk/cgi-bin/mfdStatus2.cgi", function() {<br /> $("#content").trigger('create');<br /> });<br /> <br /> var currentTime = new Date();<br /> var day = currentTime.getDay();<br /> var month = currentTime.getMonth();<br /> var year = currentTime.getYear();<br /> var hours = currentTime.getHours();<br /> var minutes = currentTime.getMinutes();<br /> var seconds = currentTime.getSeconds();<br /> var timestamp = "Last Update: " + hours + ":" + minutes + ":" + seconds<br /> $("#TimeStamp").text(timestamp);<br /> <br /> setTimeout(arguments.callee, 10000);<br /> });<br /> MFD Status Page
-
It sounds like it's not reading the variables from the printer correctly. The following variables are unique to our Lexmark MFD's you will need to find the appropriate values for your own devices. isoName = "iso.3.6.1.2.1.1.6.0" isoMessage = "iso.3.6.1.2.1.43.16.5.1.2.1.1" isoErrors = "iso.3.6.1.2.1.43.18.1.1.8" isoTonerMax = "iso.3.6.1.2.1.43.11.1.1.8.1" isoTonerLevel = "iso.3.6.1.2.1.43.11.1.1.9.1" isoTonerColour = "iso.3.6.1.2.1.43.12.1.1.4.1" isoPageCount = "iso.3.6.1.2.1.43.10.2.1.4.1.1" If you run the following command from a Linux machine you will get a list of all available SNMP details. This will write all the details to 'printer.txt' it's then a case of finding the correct values and matching them to the ISO address. snmpwalk -v -1 -c public 10.242.229.160 > printer.txt
-
Our staff do a lot of SIMS related things through a Moodle plugin however not all are happy with it, and the way I see it carrying SIMS reports on a USB stick for offline use is a massive security risk. Offering SIMS remotlely through a secure channel seems the best option, in my opinion.
-
Server 2012 R2 - Remote Apps Publishing RemoteApps in Windows Server 2012 - TechNet Articles - United States (English) - TechNet Wiki There are a few posts on here regarding this I think
-
Software Usage ... um ......software
m1k3r replied to Theldron's topic in Network and Classroom Management
Might be a bit complicated and time consuming, but could you create a 'shortcut' which is actually a batch file which first logs to a file and then launches the appropriate exe? Shouldn't effect the software and will let you know what is actually being run - when, where and by whom. We have the exact same problem. -
Are you running a 64bit version of Linux? for some 32 bit applications you need to install the 32bit libraries. Ubuntu/Debian: sudo apt-get install ia32-libs
-
No unfortunately it was cobbled together and is not on github - the only interesting part is the Python script, the HTML page is nothing more than a jQuery AJAX request on a timer and a #!/usr/bin/env python import netsnmp import os Printers = ["10.0.0.1", "10.0.0.2", "10.0.0.3"] #IPs changed for security isoName = "iso.3.6.1.2.1.1.6.0" isoMessage = "iso.3.6.1.2.1.43.16.5.1.2.1.1" isoErrors = "iso.3.6.1.2.1.43.18.1.1.8" isoTonerMax = "iso.3.6.1.2.1.43.11.1.1.8.1" isoTonerLevel = "iso.3.6.1.2.1.43.11.1.1.9.1" isoTonerColour = "iso.3.6.1.2.1.43.12.1.1.4.1" isoPageCount = "iso.3.6.1.2.1.43.10.2.1.4.1.1" MFDWarning = ["Tray 1 Low", "Tray 2 Low", "Tray 3 Low", "Black cartridge low", "Cyan cartridge low", "Magenta cartridge low", "Yellow cartridge low"] print "Content-type: text/html" print "" print "" x = 0 for Printer in Printers: command = "snmpget -v 1 -c public " + Printer + " " + isoName prnName = os.popen(command).read() prnName = prnName[prnName.find(":")+1:] prnName = prnName.replace('"', "") command = "snmpwalk -v 1 -c public " + Printer + " " + isoTonerMax TonerMax = os.popen(command).read() TonerMax = TonerMax.split("\n") TonerMax = TonerMax[:4] for i, s in enumerate(TonerMax): TonerMax[i] = s[s.find(":")+1:] command = "snmpwalk -v 1 -c public " + Printer + " " + isoTonerLevel TonerLevel = os.popen(command).read() TonerLevel = TonerLevel.split("\n") TonerLevel = TonerLevel[:4] for i, s in enumerate(TonerLevel): TonerLevel[i] = s[s.find(":")+1:] command = "snmpwalk -v 1 -c public " + Printer + " " + isoTonerColour TonerColour = os.popen(command).read() TonerColour = TonerColour.split("\n") for i, s in enumerate(TonerColour): TonerColour[i] = s[s.find(":")+1:] command = "snmpget -v 1 -c public " + Printer + " " + isoPageCount pageCount = os.popen(command).read() pageCount = pageCount[pageCount.find(":")+1:] command = "snmpwalk -v 1 -c public " + Printer + " " + isoErrors prnErrors = os.popen(command).read() prnErrors = prnErrors.split("\n") for i, s in enumerate(prnErrors): prnErrors[i] = s[s.find(":")+1:] prnErrors[i] = prnErrors[i].strip() prnErrors[i] = prnErrors[i].replace('"', "") if prnErrors[i] == "": del prnErrors[i] errorCount = 0 warningCount = 0 if len(prnErrors) > 0: for e in prnErrors: if e in MFDWarning: headerClass = "headerWarning" else: errorCount += 1 if errorCount > 0: headerClass = "headerError" else: headerClass = "headerOk" print '' print "" + prnName + " : " + Printer + "" print " Toner Levels" for i, s in enumerate(TonerColour[:4]): tLevel = TonerLevel[i] tLevel = tLevel[tLevel.find(":")+1:].strip() tMax = TonerMax[i] tMax = tMax[tMax.find(":")+1:].strip() tonerlevel = 100 * int(tLevel) / int(tMax) tonerlevelStr = str(tonerlevel) + "%" if tonerlevel <= 0: tonerlevelStr = "1%" print '' print " Errors: " + str(len(prnErrors)) + "" print "" for Error in prnErrors: print "" + Error + "" print "" print " Page Count " + pageCount + "" print "" x = x + 1 if x == 4: print "" x = 0
-
Hi, Thought I would share and ask for opinions. This is a printer monitor I created which we are finding extremely useful for resolving any printer queries. It uses Python to fetch the data from each SNMP capable printer and returns any errors/warnings (including jams), toner levels, name, IP address (which links to the printers own page) and page count and as you can see changes colour depending on the status. It is a live feed and updates every 5 seconds. The screenshot is just a section from the page. If any one is interested I will happily post the Python code. The python script is called from jQuery and returns formatted HTML which is added straight onto the page. Any suggestions?
-
I imagine you will need to combine several technologies to achieve this. Take a look at jQuery, a javascript library which simplifies interactive website development. More specifically look at the AJAX function - This allows you to send data to and from the server without reloading the page. jQuery jQuery.ajax() | jQuery API Documentation You will need to use HTML and CSS to provide syntax highlighting for the online code editor. I believe there will be some existing CSS to format/highlight Python code If you already have a LAMP server in place then this simplifies things, I initially found it quite hard getting my web server to run Python code as CGI so using PHP to run the Python script should make things easier. Using jQuery/AJAX as mentioned above you will pass the contents of the "code editor (text area)" to a PHP script which will execute the Python code and return the output back to the website using jQuery. The PHP command I believe is popen - PHP: popen - Manual I have been looking at creating something similar so if I get a proof of concept working I will post it here.
-
Good luck! For future reference I believe the CentOS iso can be written directly to a USB drive and booted using dd, eg sudo dd if=centos.iso of=/dev/sdd
-
As far as allowing them to login with their Active Directory credentials the instructions in the link below will work for any Debian/Ubuntu distro. https://wiki.debian.org/AuthenticatingLinuxWithActiveDirectory Also, you may want to try CentOS (Community version of RedHat) as it offers Active Directory integration during the installation and works flawlessly - I have started moving our web servers (and my work desktop) away from Ubuntu and onto CentOS for this very reason. CentOS Project
-
Go open source and save a fortune! - OpenBiblio | Main / OpenBiblio browse I used this to replace Heritage and the librarian couldn't be happier, it's completely web based and is quick and responsive. I've also written an addon which fetches all of the book information from the ISBN number so it makes adding new books to the library very painless. I will be happy to share if you go down this route. It handles everything from the management side of things with all sorts of reports and also offers a some what basic open gateway for students to search the library. And because it's open source you can modify it to work the way you want instead of changing the way you work to fit the system.
-
Hi Falko1, I'm not sure what you're asking but it sounds like you want to send en email using PHP? Maybe these will help: PHP mail() Function PHP: mail - Manual
-
Hi, What file permissions are on the uploaded files or the directory of which you're trying to upload to? If you have terminal access, go to the www directory and run ls -la this should list the file permissions, owner and group of the directories and files.
-
Hi, Have you forwarded the correct port on your internet router? RDP is port 3389. You need to set port 3389 from external to the internal IP of the Apps server. It will either be under NAT or Port Forwarding on the router.
