September 3, 200817 yr I personally included that incorrect checksum item in the error section, with color red, but it should really be considered a minor issue, colored orange. From my reading, there is a LOT of buggy ACPI code, causing quite a few operating system workarounds, especially in the Linux kernel. There's nothing you can do about it. As far as I know, it can only be corrected by a BIOS update, but it may be an indicator of poor work in the ACPI code part of the BIOS. I should not have marked it in red, sorry, but I do think it is something to note.
September 3, 200817 yr I personally included that incorrect checksum item in the error section, with color red, but it should really be considered a minor issue, colored orange. From my reading, there is a LOT of buggy ACPI code, causing quite a few operating system workarounds, especially in the Linux kernel. There's nothing you can do about it. As far as I know, it can only be corrected by a BIOS update, but it may be an indicator of poor work in the ACPI code part of the BIOS. I should not have marked it in red, sorry, but I do think it is something to note. No problem at all. I think it SHOULD be in red. I just didn't know if it was something I needed to correct. Sounds like I should be on the lookout for a BIOS update, but that I shouldn't be overly alarmed. The highlighting made this line jump out in a sea of messages, and that I think this is a great feature!
September 3, 200817 yr The highlighting made this line jump out in a sea of messages, and that I think this is a great feature! Yes, Rob made a nice contribution with his expansion of the patterns to match to color code. I'm sure the color-coding will evolve over time, but it is easy to swap in a new version as it does. Hearing no complaints, I am assuming the pages now finish loading correctly? Joe L.
September 3, 200817 yr I'm trying this out and I have a couple of questions: 1) I only have the following choices in the top menu: Main | Array Mgmt | Disk Mgmt | Syslog However, there are a couple of plug-in files named 25-unmenu-dupe_files.awk and 10-unmenu-links.awk that I would think should add more menu choices. What might I be doing wrong? 2) I tried running the File System Check from the Disk Mgmt screen and received the following output: Will read-only check consistency of the filesystem on /dev/ Will put log info to 'stdout' bread: Cannot read the block (2): (Is a directory). reiserfs_open: bread failed reading block 2 bread: Cannot read the block (16): (Is a directory). reiserfs_open: bread failed reading block 16 reiserfs_open: the reiserfs superblock cannot be found on /dev/. Failed to open the filesystem. If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb. Should I run the --rebuild-sb command like it suggests? Is this telling me that something is wrong with my file system?
September 3, 200817 yr I'm trying this out and I have a couple of questions: 1) I only have the following choices in the top menu: Main | Array Mgmt | Disk Mgmt | Syslog However, there are a couple of plug-in files named 25-unmenu-dupe_files.awk and 10-unmenu-links.awk that I would think should add more menu choices. What might I be doing wrong? Put those files in the same folder as unmenu.awk Change directory to that folder before starting unmenu.awk. (By default, it is looking for those files in the "current" directory... i.e. The one you type the command awk -W re-interval -f unmenu.awk command from. You will need to stop the program (type control-C in the window you started it in) and then re-start it. 2) I tried running the File System Check from the Disk Mgmt screen and received the following output: Will read-only check consistency of the filesystem on /dev/ Will put log info to 'stdout' bread: Cannot read the block (2): (Is a directory). reiserfs_open: bread failed reading block 2 bread: Cannot read the block (16): (Is a directory). reiserfs_open: bread failed reading block 16 reiserfs_open: the reiserfs superblock cannot be found on /dev/. Failed to open the filesystem. If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb. Should I run the --rebuild-sb command like it suggests? Is this telling me that something is wrong with my file system? No... do not run reiserfsck, not yet anyway. It is apparently trying to do a file system check on /dev (which is NOT a file system, on anybody's server, so it is complaining it cannot find one.) Normally, it would be running on /dev/md1, /dev/md2, etc. Were you trying to do a file-system check on your parity drive? (it does not have a file-system... ever... just bit calculations) or on one of your data disks? Is your array started? Can you get to the normal web-management page at htp://tower? type the following commands after logging in as root and post the output. It will help me to figure out what is going on. cd /root mdcmd status | strings also post a syslog. Instructions in the wiki. Joe L.
September 3, 200817 yr You were correct on both accounts: 1) I was not starting from the same folder as where unmenu.awk (and the plug-in files) is located. I tried that and it worked fine. I now have more menu choices!! 2) I was trying to do a File System Check on the Parity drive. Ok. Both should have been obvious to me but I don't know Linux or unRAID like you guys. I'm really trying though! One more question... I noticed that when I start unmenu.awk that it seems to run in the same process as my Telnet session. I'm assuming that if I closed the Telnet window that unmenu would stop. This makes me wonder if it would be a bad idea to start unmenu.awk from my go script. Are you guys starting unmenu.awk in your go script??
September 4, 200817 yr You were correct on both accounts: 1) I was not starting from the same folder as where unmenu.awk (and the plug-in files) is located. I tried that and it worked fine. I now have more menu choices!! 2) I was trying to do a File System Check on the Parity drive. Ok. Both should have been obvious to me but I don't know Linux or unRAID like you guys. I'm really trying though! Glad you got things working batter. One more question... I noticed that when I start unmenu.awk that it seems to run in the same process as my Telnet session. I'm assuming that if I closed the Telnet window that unmenu would stop. This makes me wonder if it would be a bad idea to start unmenu.awk from my go script. Are you guys starting unmenu.awk in your go script?? I would not do that at this time, but you could... Just make sure you run it in the background. Instead of addiing it your go script, while it is still in beta development, you can type: nohup awk -W re-interval -f unmenu.awk >/dev/null 2>&1 & and it will run and not tie up your telnet session. Joe L.
September 4, 200817 yr I can't improve or offer any enhancements to this, but I just had to say that this is absolutely fantastic for someone that isn't well versed in linux-based commands and operations. It has really simplified some of the remedial tasks that I just can't remember and have to go to my little notepad for. Thanks and great work!
September 6, 200817 yr Some suggestions: For the statistics output, insert "<pre>" after the heading and before the smartctl output (line 833) and remove the "<br>" in the while loop (line 839). The HTML preformatted tag will allow the columns to appear as intended. Add a button for "HDParm info" to show the output from hdparm -I /dev/hdx (particularly usefull is the Capabilities section) I use a static IP and not a system name, so the links use the system name from "uname" output don't work unless I mod your script. Also, I'm not sure why but on my system, df returns the filesystems as /dev/md/3 rather than /dev/md3 (which is of course symlinked to /dev/md/3) So I put in a check for "md/" and insert the "/" if needed.
September 6, 200817 yr Some suggestions: For the statistics output, insert "<pre>" after the heading and before the smartctl output (line 833) and remove the "<br>" in the while loop (line 839). The HTML preformatted tag will allow the columns to appear as intended. Add a button for "HDParm info" to show the output from hdparm -I /dev/hdx (particularly usefull is the Capabilities section) I use a static IP and not a system name, so the links use the system name from "uname" output don't work unless I mod your script. Also, I'm not sure why but on my system, df returns the filesystems as /dev/md/3 rather than /dev/md3 (which is of course symlinked to /dev/md/3) So I put in a check for "md/" and insert the "/" if needed. Thanks for the feedback. Isn't it nice to be able to make little changes as needed in the web-interface. The "hdparm -I" button is a good idea. Do you have any ideas for how to handle the static IP in your situation? I'm not sure I understand the difference in the uname output. I use a static IP address on my server, and uname works here. Can you give me an example of the output on your server? Same issue with the "df" command. Can you either show me the df output, or share the defensive code you added to fix the names of the devices? I'll make the changes as described and get a new version posted in the next few days or so. I'm at the point in writing my file-browser "plug-in" where it gets really tricky. What to do when a person clicks on a file in the resulting listing? My choices are to do nothing... (not make the files into links) (I don't like this myself) or If the file is small enough, send it back to the browser as requested. (I'm limited by the available memory on the server, as it must all be read back into memory and then sent as a single transmission to the browser.) (My preference so far) or If the file is too large, present an alternate link to the shared drive for the same file. This way, SAMBA has to deal with the file, and not my awk based server. Since I don't have but 512Meg of ram on my server, I am probably going to limit the size of the files returned to < 10 Meg or so... assuming I get this part working of course... (Also my preference so far) A more complicated and elaborate, multi-threaded server would not have this limitation, but from what I've learned, IE7 closes the original connection after it has been used a few times, and then issues a new connection for the next segment of a transmission. Since I only have one "thread" in my awk based server, I cannot service the multiple connections. during my initial testing, my server would end unexpectedly (crash? on exception? but with no error message?) as it attempted to write to the HttpConnection with nobody listening. So... the file-browser add-on must write the contents of a file to the main server process, it must read it all into memory, and then send it onward to the Client PC's browser in one "write" to Httpconnection.. So, what features are useful in a file browser plug-in? What would you like to see in a directory listing. Same as "ls -l" ? Joe L.
September 7, 200817 yr root@b3:~# uname -a Linux b3 2.6.24.5-unRAID #14 Wed Sep 3 09:19:38 GMT-5 2008 i686 AMD Athlon(tm) X2 Dual Core Processor BE-2400 AuthenticAMD GNU/Linux If I add "192.168.0.16 b3" to the hosts file on my PC, it will of course work. root@b3:~# df -H Filesystem Size Used Avail Use% Mounted on /dev/hda3 237G 166G 59G 74% / tmpfs 230M 0 230M 0% /dev/shm /dev/sdj1 1.1G 111M 890M 12% /flash /dev/md/3 401G 399G 1.4G 100% /mnt/disk3 /dev/md/9 1.1T 300G 702G 30% /mnt/disk9 /dev/md/2 501G 490G 11G 98% /mnt/disk2 /dev/md/4 501G 497G 3.5G 100% /mnt/disk4 /dev/md/5 501G 491G 9.9G 99% /mnt/disk5 /dev/md/6 401G 341G 60G 86% /mnt/disk6 /dev/md/1 1.1T 917G 84G 92% /mnt/disk1 /dev/md/8 301G 299G 1.3G 100% /mnt/disk8 In Apache I'd use SERVER_NAME or HTTP_HOST which will be the ip addy if the server was accessed by ip, and the server name if accessed by name. As for a file browser, with a server, I would take a conservative approach.... and never risk server crash or memory exhaustion.... particularly since they can use MC or a number of other methods (i.e. map a drive and use Windows explorer) at their disposal.
September 8, 200817 yr Here's a little addition to the unmenu. It adds an option for "Hardware Info" and pulls data from acpitool (if you have it), lm-sensors (if you have it) and /proc/cpuinfo (everyone has it). Unzip it and put it with the other plugins and unmenu.awk.
September 8, 200817 yr Here's a little addition to the unmenu. It adds an option for "Hardware Info" and pulls data from acpitool (if you have it), lm-sensors (if you have it) and /proc/cpuinfo (everyone has it). Unzip it and put it with the other plugins and unmenu.awk. It might be me, but I cannot unzip this. Joe L.
September 8, 200817 yr I just downloaded it, and it appears to unzip fine on Windoze with Winzip and Winrar, but not with the unzip included with unRAID. Here is a new zip file created with the unzip included in unRAID.
September 8, 200817 yr I tried un-zipping your first post's copy with the "unzip" built into Vista, and also two different un-zip programs (win-unzip on win2k, and 7-zip ) all said they did not know how to deal with the compressed file. The second posted copy unzipped just fine. Thanks. (figures that Linux would get it right) You have the honor of being the first to share a plug-in. (other than me, of course) You do need to stop and re-start the awk server for it to "see" that you added a new plug-in. It then shows up in the top menu as expected. Your plug-in looks great. I can see it evolving as more "system" features are added to it. Now, a more interesting question about organization. I certainly do not want to manage every plug-in every contributed... in fact, even if I wanted to, I will not have the hardware configuration to be able to support some... I think it is probably a good time to start a new thread, just for unmenu.awk, probably in the user-customizations forum. Do you agree? I also think the basic tool and ad-on programs should be a zipped file, attached only to the first post to that thread and updated, as needed. Hopefully, the tool is stable enough to not need many updates going forward unless I'm adding a new feature that belongs on the main page, disk mgmt, or system mgmt page. A new user can then un-zip and run it on their flash drive. We can put together an install package later. Or, do you suggest an install package first?? Opinions? Beginners are probably more comfortable with unzip. Other plug-ins can be attached to subsequent posts, in that thread, as people develop them. Joe L.
September 8, 200817 yr I have one more "alpha" version of unmenu.awk to share in this thread, then I'll start the other. I figure this should be a good way to let a smaller initial population play with it before everybody picks it apart. This version has the few improvements suggested by bubbaQ, and also two new plug-in's written by me. For bubbaQ, you can specify the "host" name as you invoke it to be your IP address so the IP subsequently resolves on linked machines that do not use a nameserver, or have a hosts entry.xz One plug-in is for those with APC brand UPS's. It shows the UPS Status. It is display only. The other plug-in is for almost anybody. It is a file-browser plug-in. It allows you to traverse your "user" and "disk" shares, and even to click on and open small and moderate sized files. (I do not allow you to open files over 10 Meg in size, but you can change that to a larger size if you have a lot of RAM and do not care if it takes a long time to get your file. (awk is nowhere near as efficient at this as a dedicated server) The file needs to be completely read into memory and then copied from one process to another as it sends it onward to the browser. In other words, it probably needs near 30 Meg of memory for itself when serving such a large file. You would not want to run out of RAM by serving an ISO image. (Can't fit 10 Gig of data into 512 Meg of RAM, even if you wanted to.) If you attempt to click on a file larger than allowed, you just get a warning it it too big. It does allow you to click on text files, pictures, mp3 files (under 10 Meg in size). If it knows the file type, it will send it to the browser. If it does not, it will upload it to the browser for your "PC" to deal with. I am very happy to have gotten this to work... it is really tough dealing with binary files in awk. It has no ability to change the files on the server, nor any to delete the files. It has NO security other than being restricted to a set of starting folders. By default, these are /mnt/user and /mnt/disk1,2,3.... You can edit the plug-in to change this easily. You can limit it to specific folders and completely exclude others. You can add a "top" level folder of "/" and browse anywhere. It does not look at how you have partitioned user-shares by login id. It can browse anywhere. The exact same way you can browse using telnet and "ls" It looks a bit like this when browsing a sub-folder: newest version is attached here:http://lime-technology.com/forum/index.php?topic=2595.msg20982#new Joe L.
September 8, 200817 yr Awesome! Looking forward to playing with this tonight. I have been working on a plugin and hope to post it soon. It takes a while when you are learning awk at the same time. BTW, are those pictures of the first moon landing? (They seem to be about the right vintage)
September 8, 200817 yr Awesome! Looking forward to playing with this tonight. I have been working on a plugin and hope to post it soon. It takes a while when you are learning awk at the same time. BTW, are those pictures of the first moon landing? (They seem to be about the right vintage) Even worse than a VCR with the time and date still blinking 12:00 is an 8 or 9 year old digital camera with the date not set. Awk shares a lot of syntax with "C", Javascript, Java... I think you'll do fine. Most plug-ins will be pretty easy and can be patterned after one I've written. I do not suggest you write anything complicated like "a web-server" in awk as a first project, as it probably can't be done. My newest "file_browser" plug-in is different than the others I've written in that it completely supplies the HTTP headers and HTML content. It therefore does not know of the other menu choices read from the other "plug-ins, and presents only a "Main" menu choice to get back to the main menu. (It could be added, but I did not bother since it was enough for me to just get back to the main page) I needed to write the plug-in this way since the HTTP header changes based on the type of file being served/uploaded and I could no longer rely on the main unmenu.awk to supply a generic "text/html" header for me. Joe L.
September 8, 200817 yr I noticed that when you do a "View Source" on a plugin page, it does not get the structural HTML tags (e.g., <HTML>, <HEAD>, <BODY>). I think that the very first version did have those tags. Is this by design? Just curious.
September 8, 200817 yr I noticed that when you do a "View Source" on a plugin page, it does not get the structural HTML tags (e.g., <HTML>, <HEAD>, <BODY>). I think that the very first version did have those tags. Is this by design? Just curious. Not by design, unless you are doing the HTTP headers, in that case, you do everything in the plug-in. I'll need to take a look. Probably an oversight. Good thing the browser's are tolerant... (User-Acceptance Testing is fun.... :'( :'() Joe L.
September 8, 200817 yr I fixed it. I also added a new parsed value you can put at the top of a plug-in to let it do the top of page itself. If you write a plug-in and want to do your own <HTML><HEAD> ... </HEAD><BODY> ... </BODY></HTML> All you need to do is add a line like this to your plug-in: #ADD_ON_HTML_TAGS=NO And the lines will not be added to the HTML the plug-in supplies. If you leave the line off (don't have one in your plug-in), it is assumed to be YES, so it should not break any existing plug-ins. Joe L. newest version is attached here: http://lime-technology.com/forum/index.php?topic=2595.msg20982#new
September 8, 200817 yr First off this is really cool and useful!!!! Is it ok to leave this running all the time? I noticed that if I enter the command to start this it appears to "lock" the console, even though I know it does not and everything is working, until I do a CTRL-C to close unmenu. Is this only meant to be run for a certain period of time? Further more could I just add the command to the GO script to have this running at all times??? Thanks, Scott
September 8, 200817 yr First off this is really cool and useful!!!! Thanks. I think so too. Is it ok to leave this running all the time? I noticed that if I enter the command to start this it appears to "lock" the console, even though I know it does not and everything is working, until I do a CTRL-C to close unmenu. Is this only meant to be run for a certain period of time? Further more could I just add the command to the GO script to have this running at all times??? See this post: http://lime-technology.com/forum/index.php?topic=2110.msg18741#msg18741 It will not hurt anything, to leave it running. You do need to stop and re-start it if you add a new "plug-in" module file. It only scans for them when it first starts. You are encouraged to write a plug-in and then and share it with the rest of us. ... especially if it does something useful. A plug-in is a file named ZZ-unmenu-whatever_you_like.awk where ZZ is a two digit number. The number indicates where in sequence it will be added to the top menu. the simplest "awk" plug-in would have the following 6 lines as contents: BEGIN { #ADD_ON_MENU=Hello World #ADD_ON_URL=hello_1 #ADD_ON_TYPE=awk print "Hello World" } the simplest "shell" plug-in would have the following 3 lines as contents: #ADD_ON_MENU=Hello World #ADD_ON_URL=hello_2 echo "Hello World" Thanks, Scott Now, you can be a web developer too... You are welcome. Joe L.
September 9, 200817 yr To illustrate how easy this can be... I added these three lines to a file named 40-unmenu-uptime.cgi and put that file in the same folder as unmenu.awk. #ADD_ON_MENU=Uptime #ADD_ON_URL=uptime uptime I stopped and re-started my unmenu.awk process, and here is the result. A new "Uptime" menu choice, and a new piece of information available via the web interface. If multi-line output was present, I would have had to either add HTML formatting, or simply echo "<pre>" before the entire output. <pre>, in HTML, indicates the following output is preformatted and should be shown as is. Here is an example of a multi-line Process List plug-in (all 4 lines of it) I named it 41-unmenu-process_list.cgi : #ADD_ON_MENU=Process List #ADD_ON_URL=process_list echo "<pre>" ps -ef It looks like this now when invoked: In the process list (near the bottom, process 2580) you can see that when the shell invokes the "cgi" plug-in, $1 is the current array state, $2 is always "GET", $3 is the URL. This ($3) will have the querystring parameters from form fields as well. You would need to parse them from $3 as needed. I'm considering using $4 to pass a concatenated set of URL/Menu Label pairs, so it would be easy to add a full top menu to any plug-in, even those that do the full HTTP headers themselves. Any command that can be output to the screen and that is not interactive (wanting input from the user) can be made into a plug-in with ease. Hope this gives you a few ideas. Most of the add-on packages we are putting on our servers have a command line interface, many have the ability to invoke a command to get status. Now it is easy to web-enable those same commands. Joe L.
September 9, 200817 yr Try this one... you get both uptime AND a process list... Not too shabby for 4 lines of plug-in. You could name it 25-unmenu-top.cgi #ADD_ON_MENU=Top Processes #ADD_ON_URL=top echo "<pre>" top -b -n1 or this one for SAMBA status... name it as 25-unmenu-smb_status.cgi #ADD_ON_MENU=SAMBA Status #ADD_ON_URL=smb_status echo "<pre>" smbstatus Have fun... Joe L.
Archived
This topic is now archived and is closed to further replies.