An Improved unRAID web-interface, extensible, and easy to install


Recommended Posts

  • Replies 552
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Just came across this while checking over Bubbaraid's thread. Wow, VERY nice work you've done here and quite simple to install with the new procedure! I have put this on both my 4.3.3 and 4.4 box - love it! Thank you for coding up something genuinely useful and interesting! I have pointed it out to friends already and will spread the word further - very nice enhancement!

Link to comment

Hello,

When using uu to launch unMenu I'm constantly loosing unMenu  ...

 

I downloaded all three zip files and extracted them all to /boot/unmenu.

 

if I launch the old way it continues working

"nohup sh -c ""while true; do awk{SPACE}-{SHIFTDOWN}w{SHIFTUP}{SPACE}re-interval{SPACE}-f{SPACE}unmenu.awk; done"" >/dev/null 2>&1 &{ENTER}"

 

also I've noticed on a fresh install of unRaid that unMenu no longer allows the mounting or smart testing of drives outside of the unRaid array on the Disk Management page ... which was handy ... but I guess the command line is my friend too ;-)  Maybe slow that memory loss too ;-)

 

Thanks for your time,

Bobby

Link to comment

Hello,

When using uu to launch unMenu I'm constantly loosing unMenu  ...

 

I downloaded all three zip files and extracted them all to /boot/unmenu.

 

if I launch the old way it continues working

"nohup sh -c ""while true; do awk{SPACE}-{SHIFTDOWN}w{SHIFTUP}{SPACE}re-interval{SPACE}-f{SPACE}unmenu.awk; done"" >/dev/null 2>&1 &{ENTER}"

 

also I've noticed on a fresh install of unRaid that unMenu no longer allows the mounting or smart testing of drives outside of the unRaid array on the Disk Management page ... which was handy ... but I guess the command line is my friend too ;-)  Maybe slow that memory loss too ;-)

 

Thanks for your time,

Bobby

Bobby,

The version of unmenu.awk I just posted most certainly allows you to mount disks outside of the array.  I'm guessing you are still running the old version.  You must stop it and the old while loop running it BEFORE you start the new one. 

 

After you invoke "uu" you will simply return to the command prompt.  If you type "ps -ef" you will see amoung the other processes listed the following:

root      3782    1  0 Dec20 pts/0    00:00:00 /bin/bash /boot/unmenu/uu

root      3783  3782  0 Dec20 pts/0    00:00:40 awk -W re-interval -f ./unmenu.awk

The first process is the "uu" command that has a parent process ID of "1" (the third column)

The second has a parent process ID of the "uu" command and is the actual "awk" command being invoked. 

 

Below is a screen shot of my array on the "Disk Management" page.  I have 4 physical disks outside of my array. One of those (the 8Gig Quantum Fireball) has a reiserfs file-system on it.  It therefore is the only one that may be mounted. It is also the only one with a "Mount" button.  The others I've been using to test my pre-clear script, and have no file-system, and therefore cannot be mounted. (so no mount option button)

 

The mount options in unmenu.conf look like this:

# Define per-filesystem mount options.
MOUNT_OPTIONS reiserfs = -r -o noatime,nodiratime -t reiserfs
MOUNT_OPTIONS ntfs-3g  = -r -o umask=111,dmask=000 -t ntfs-3g
MOUNT_OPTIONS vfat     = -r -t vfat
MOUNT_OPTIONS msdos    = -r -t msdos
MOUNT_OPTIONS ext2     = -r -t ext2
# This option for "other" is used for fs-types not specifically defined.
# the file system type is added by common code since it can not be specified here.
MOUNT_OPTIONS other    = -r
# the built-in ntfs driver is read only... DO NOT atttempt to use it as r/w
MOUNT_OPTIONS ntfs     = -r -o umask=111,dmask=000 -t ntfs

 

As I said in the first post, many things have changed.  In my original release the file-system mount options were fine for NTFS, but wrong for reiserfs.  Now, most any file-system known by unraid will work, and the mount options are all in the unmenu.conf file.

 

2nk2xhf.jpg

 

Hope this helps.  What do you see when you type "ps -ef" ?  If you do not know how to kill processes, just reboot your server, assuming you did not put a line in your "go" script to start unmenu, it should then be gone from the set of running processes.

 

Joe L.

Link to comment

I installed the new unmenu. It sometimes crashes and has to be relaunched from the command line. Any idea what I should looked for the problem?

To diagnose this, we need to see the error messages.   How do you know it "crashed" ?  If it crashed, it would not be visible in the output of the "ps -ef" command.

 

The unmenu.awk server is limited to one active page request at a time.  If it is working on one request, a subsequent request will fail to return a web-page.  Normally, this is not an issue.  Are you thinking it has crashed because a page is not rendered?

 

If you type

ps -ef

and you do not see "awk -W re-interval -f ./unmenu.awk" then it indeed has crashed( or never started since a previous version of unmenu is still running and has control of the port)

If you still see the old "while" loop, then it must be killed FIRST, before you can stop the "awk" process, and before you can start the new version.

 

If the old "while" loop is not present, and the new command still fails to start, try just invoking the awk command on the command line as follows:

awk -W re-interval -f ./unmenu.awk

 

It will show any error messages, and not exit until you kill it (normally).

 

To stop it, if you start it this way, type "Control-C"

 

Joe L.

Link to comment

also I've noticed on a fresh install of unRaid that unMenu no longer allows the mounting or smart testing of drives outside of the unRaid array on the Disk Management page ... which was handy ... but I guess the command line is my friend too ;-)  Maybe slow that memory loss too ;-)

 

Thanks for your time,

Bobby

One thing I did not think of... the "smartctl" program is broken on the 4.4final or 4.5beta releases of unRAID.

Type

smartctl -?

at the command prompt.  If it complains about a missing library, then that might be the answer to why you cannot do "smart" testing of drives.

 

Use the "Package Manager" to load the missing "cxxlibs" library.

 

Joe L.

Link to comment

Yes, a page is not being rendered. So I request another page and get the same result. I guess I need to be more patient

Some "pages" can take up to 30 minutes or more to return. (The "Check File-System" buttons especially)  Some will need to wait for all the drives to spin up before returning (the "Smart view" page in myMain)  Others will need to spin up all the disks to scan their contents for files (The Dupe Files plug-in)

 

In addition to your requests for pages, the "Main" and "myMain" pages self-refresh.  (their refresh intervals are also configures in their respective .conf files.)  If they auto-refresh, and you click on a link before the auto-refresh request returns with its result, unmenu.awk will return no page.

 

The fact that I have written a web-server at all using only "awk" is a pretty decent accomplishment.  It does have some limitations in that it can only handle one request at a time.   unmenu.awk initially was written as a way to explore possible improvements to the unRAID user-interface.   What you see in the 1.1 version is a result of the help and input from many on this forum.  Some contributed ideas, others contributed code and suggestions for improvements, some just acted as testers to let me know what it did on their server, with their configuration of disks.  All in all, it has been a group effort.

 

At this point, with all unmenu.awk can do, it has turned into a very useful utility with many capabilities not in the Lime-Technology supplied management interface.  The possible future plug-ins are endless.  I've already seen screen shots where people have added many new features of their own to their servers for locally installed programs.  (There are a lot of very talented people out there)

 

Joe L.

Link to comment

I had unmenu_awk1-0-0 working with unRaid Server beta 4.5-beta1 using the old method of calling unMenu and it was Mounting and unmounting drives from the Disk Mgmt page ...

 

Then I extracted the new unmenu files into the old unmenu directory that was in my /boot/packages/unmenu directory.

I then moved /boot/packages/unmenu to /boot/unmenu in order to use the new calling method.

 

using the old calling method unmenu seemed to work fine for me ...

 

 

Looking at the flash and how messy it was getting from experientation ...

 

I decided to wipe my flash key yesterday and start fresh ...

 

I rar'd all files from the flash on my Windows XP desktop ...

 

then formatted the flash key as fat32

 

renamed it to

UNRAID

 

did a

syslinux.exe -ma f:

on the flash

 

extracted unRAID Server 4.4.zip onto the flash to get 'all' release files on the flash

 

extracted unRAID Server 4.5-beta1.zip onto the flash to upgrade to the beta

 

edited my go script to look like this

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

installpkg /boot/packages/lm_sensors-3.0.3-i486-1.tgz
SMARTCTL=YES installpkg /boot/packages/powerdown-1.02-noarch-unRAID.tgz

sleep 30

for i in /dev/md*
do
    blockdev --setra 2048 $i
done

# Increase the directory caching
echo vm.vfs_cache_pressure = 0 >>/etc/sysctl.conf
sysctl -p /etc/sysctl.conf

/boot/unmenu/uu

 

/boot/config - copied most files over from the config directory

the shares directory (no I probably didn't need to but I'm being lazy)
disk.cfg
go
group
ident.cfg
network.cfg
passwd
pro1.key
share.cfg
smbpasswd
super.dat
Vancouver

 

/boot/logs -- (powerdown? - smartlogs) wanted to migrate these

 

/boot/packages -- pre-loaded with

lm_sensors-3.0.3-i486-1.tgz
powerdown-1.02-noarch-unRAID.tgz

 

/boot/scripts  - threw them here to clear them from the mess in the packages directory may move them back later to be compliant to any standards

preclear_disk.sh
smarttest.sh

 

/boot/smart_results -- (smarttest.sh? -- more smartlogs)

 

/boot/syslinux

 

/boot/unmenu directory with the following three files extracted to it

unmenu-1-1.zip
unmenu plug-ins-1-1.zip
unmenu package conf-1-1.zip

 

then I ejected the flash key

removed it from the windows computer

 

put it into the unRaid computer

and after a succeful boot of unRaid Server 4.5 beta 1

all drives picked up in the right places

with the right passwords on everything

dates ... times ... DNS servers ... NTP ... Network Settings ... WooHoo

 

In Firefox I loaded storage:8080 (inventive server name ... I know)

 

went to the unmenu package manager and I downloaded these packages and set them to :

Currently Installed. Will be automatically Re-Installed upon Re-Boot.

bwm-ng - Bandwidth Monitor NG (Next Generation), a live bandwidth monitor 
cxxlibs-6.0.8-i486.tgz library accidentally left out of unRAID 4.4-beta2
pci utils (pci utilities)
SMART tools (smartctl hard drive monitoring utilities)
infozip (Info-ZIP's zip and unzip utilities)

 

then I rebooted (mostly a Windows guy for the last decade and a half ... )  (QNX was 20 years ago) (apple II+ 25?)

 

and then I realized do I need to change the server name in one of the unMenu Scripts?

 

and I guess I would also have to ask are drives run through your pre_clear.sh script formatted at the end of the process?

 

Opps ... My bad ... they were before I started ::) ... I ran the pre_clear.sh script on the ones that won't mount ...

 

 

I gotta start working dayshift ... working nights is slowly rotting my mind

 

 

So from the Disk Management page we can only get smart data on drives that can be mounted or are part of the array?

 

 

I thank you for a lot of great work and incredible support in your projects here ...

 

thanks for your time,

Bobby

 

 

 

 

 

Link to comment

I gotta start working dayshift ... working nights is slowly rotting my mind

Possibly  ;)

So from the Disk Management page we can only get smart data on drives that can be mounted or are part of the array?

Wrong.  You can only "mount" a disk if it has a file-system on it (and it is already not mounted, of course, or already assigned to the array).  You can run "smartctl" and get SMART reports on ANY disk, in the array or not, if it has a partition on it with a file-system, or not.   

 

However...  When Tom packaged up 4.5beta and 4.4final, ane even the beta before that, the version of "smartctl" he included needed a library file he did NOT include, therefore, it will not work on ANY disk until you install the missing library.

 

When you "pre-clear" a disk it erases EVERYTHING on it.  If it had a file-system on it before, it will be gone when the pre-clear finishes.  The pre-clear erases whatever partitioning it had and replaces it with a single partition and NO file-system. So to answer your question, no, it is NOT formatted when the pre-clear is done.

I thank you for a lot of great work and incredible support in your projects here ...

 

thanks for your time,

Bobby

You are welcome.
Link to comment

/boot/unmenu directory with the following three files extracted to it

unmenu-1-1.zip
unmenu plug-ins-1-1.zip
unmenu package conf-1-1.zip

 

then I ejected the flash key

removed it from the windows computer

Did you unzip the files before you ejected the flash key?  I'm not sure I specifically said so, but, you do need to perform that step.

 

When you unzip them, it will look a lot like this:

[pre]root@Tower:/boot/unmenu# ls

07-unmenu-mymain.awk*            29-unmenu-sysinfo.awk*            990-unmenu-wget.awk*          myMain.conf*                        unmenu.base.lib.awk*

10-unmenu-links.awk*              30-unmenu-file_browser.awk*        999-unmenu-unraid_main.awk*  myMain_local.conf*                  unmenu.conf*

10-unmenu_user_script_hello*      30-unmenu_user_script_getra*      MoveCopy.htm*                ntfs-3g-1.5130-unmenu-package.conf*  unmenu_package_conf-1-1.zip*

1000-unmenu_user_script_restart*  30-unmenu_user_script_setra-0256*  apcupsd-unmenu-package.conf*  pciutils-unmenu-package.conf*        unmenu_plug-ins-1-1.zip*

16-unmenu-syslog.awk*            30-unmenu_user_script_setra-1024*  bwm-ng-unmenu-package.conf*  rc.local-unmenu-package.conf*        utility.lib.awk*

17-unmenu-syslog.awk*            30-unmenu_user_script_setra-2048*  cxxlibs-unmenu-package.conf*  smartctl-unmenu-package.conf*        uu*

20-unmenu-usage.awk*              40-unmenu_user_script_disk_speed*  drivedb.lib.awk*              syslog_match.conf*                  zip-unmenu-package.conf*

20-unmenu_user_script_goodbye*    50-unmenu-user_scripts.cgi*        file-unmenu-package.conf*    unmenu-1-1.zip*

25-unmenu-dupe_files.awk*        99-unmenu-utility.awk*            lsof-unmenu-package.conf*    unmenu.awk*

[/pre]

Link to comment

Is it possible to have MyMenu as default main menu for UnMenu?

I've not mentioned it before, except to bjp999, but yes, it is very easy.

 

You will need to edit one file, to change one line.   It must be done using an editor that does not change the unix NL into CR/NL pairs.  or, you can run the file through "fromdos" as described in the wiki.

 

The file that needs to be edited is 07-unmenu-mymain.awk

 

The line that needs to be changed is the second line in the file.

 

Currently it says:

#ADD_ON_URL=myMain

 

You want to change it to say:

#ADD_ON_URL=

 

Just edit the line so the "=" is the last character on the line. (getting rid of the "myMain" URL)   This plug-in will then override the default unmenu "Main" page and not appear as an additional menu choice.

 

After you edit the file you will need to kill and re-start unmenu.awk so it re-reads the plug-ins to generate the appropriate top menu choices.

 

All plug-ins work the same way... I am already overriding the built-in syslog viewer with the plug-in version that does color coding of lines, you can do the same if you write a replacement for any page.  You can do the same for the Array management or Disk Management pages if you wrote replacements (Those are the only other two built-in pages)

 

Joe L.

Link to comment

Joe - I've upgraded to v1.1 and have a couple of issues I'm trying to resolve.  Both of these are issues that I didn't have before v1.1

 

1) I don't know if it has something to do with changing to the 'uu' method of starting unmenu, but I seem to lose access every now and then and have to run 'uu' from the command line again to regain access again.  I used to start unmenu with the following in my go script.

 

cd /boot/unmenu

nohup sh -c "while true; do awk -W re-interval -f unmenu.awk; done" >/dev/null 2>&1 &

 

I'm going to switch back to this method to see if anything changes.  I first noticed this when I was testing the Kill Unmenu user script.  It seems that the process isn't restarting itself like I expect it should.

 

2) In unmanu_local.conf if I set the main_page_user_content to show the syslog it works great.  If I set it to show a list of open files I get a 404 Page Not Found error.  I have the LSOF package installed and If I list open files from the System Info page it works fine.

 

Any ideas?

Link to comment

Joe - I've upgraded to v1.1 and have a couple of issues I'm trying to resolve.  Both of these are issues that I didn't have before v1.1

 

1) I don't know if it has something to do with changing to the 'uu' method of starting unmenu, but I seem to lose access every now and then and have to run 'uu' from the command line again to regain access again.  I used to start unmenu with the following in my go script.

 

cd /boot/unmenu

nohup sh -c "while true; do awk -W re-interval -f unmenu.awk; done" >/dev/null 2>&1 &

 

I'm going to switch back to this method to see if anything changes.  I first noticed this when I was testing the Kill Unmenu user script.  It seems that the process isn't restarting itself like I expect it should.

That button in user-scripts still "kills" unmenu, but the loop now exits on that "kill" and does not loop to "restart" itself.  That behavior for that button is now expected.  You must "restart" manually.

 

Under what other conditions does the process seem to exit? 

 

Apparently, I'll need to add more to the "uu" command to allow logging of what is occurring.  I've never had "awk" exit except when I "cancelled" a syslog upload to an IE browser.  The port is closed by the browser and "awk" errors out when it trys to write to the port with a "fatal error"  That is the whole reason for the original while loop.  The new "while" loop still loops on that specific exit status of "141".  It now exits on everything else.   If there is another circumstance in which it is exiting, I need to learn more about it.   I'll post an improved "uu" once I figure out how to get it to log the error and exit status.  Do you use IE or Firefox to get to your server?  What version? What OS?

2) In unmanu_local.conf if I set the main_page_user_content to show the syslog it works great.  If I set it to show a list of open files I get a 404 Page Not Found error.  I have the LSOF package installed and If I list open files from the System Info page it works fine.

 

Any ideas?

Oops... yes... I do...

You have a "System Info" page, with a button that does "lsof" installed.  You do not have a plug-in with a "URL" of "lsof" so, the "404" error is accurate.

 

I did write a stand-alone "lsof" plug-in for this exact purpose, but, as you discovered, did not include it in the prior "zip" file of plug-ins.  (I also never un-commented the unmenu.conf entry or created a unmenu_local.conf file to test it in the final release folder either. As I said, oops... )

 

In any case, attached is the missing "plug-in"   If you look at the code in the plug-in itself, the third line that defines the "Menu" item is blank.  That allows a plug-in url to exist, but NOT show up in the top of screen menu of possible menu-choices.   Since this "plug-in has no "status" area or set of top menu links of its own, that is appropriate.  We don't want those areas for the bottom of the main screen.

 

Not sure if I mentioned this earlier, you can now create an unmenu_local.conf file with just the few parameters you want to change in the "default" unmenu.conf file.  It will override the "default" definition.  That way, when new releases add to the unmenu.conf you do not have to re-edit it to locally configure it.

 

In your case, an unmenu_local.conf file with the one line here would do it (after you install the attached plug-in and re-started unmenu) :

main_page_user_content = height=280 frameborder=0 marginwidth=0 src="http://%MyHost%:%MyPort%/lsof"

 

It looks like this once you put it into place:

2expruf.jpg

 

Have fun.

 

Joe L.

Link to comment
That button in user-scripts still "kills" unmenu, but the loop now exits on that "kill" and does not loop to "restart" itself.  That behavior for that button is now expected.  You must "restart" manually.

 

Oh, OK.  Good to know.  If I start unmenu the old way (like I mentioned before and not using 'uu') will unmenu restart by itself after I press the kill button?  I kind of liked that behavior.  Unless you have a reason that this is a bad idea that I should know about.

 

Under what other conditions does the process seem to exit?

 

I'm still trying to figure this one out.  It caught me by surprise a couple of times and I haven't yet recognized the pattern.  I'll let you know as I learn more.

 

The attached plugin worked great to fix my file list on the main page.  Thank you very much!!

Link to comment

Oh, OK.  Good to know.  If I start unmenu the old way (like I mentioned before and not using 'uu') will unmenu restart by itself after I press the kill button?  I kind of liked that behavior.  Unless you have a reason that this is a bad idea that I should know about.

Basically, the old loop caused all kind of issues for some people.

1. If you were not in the correct folder when you invoked it, it would loop as fast as possible on your processor, never finding the "awk" script. This loop would be infinite, and even though today's CPUs are much faster than in past years, would still seem to run forever...  ;)

2. If you invoked it twice, the second would loop forever, as fast as possible using up CPU resources as its instance of "awk" would not be able to use the same port as the first, and the loop would run forever.

3. In the future, I'll be adding more complicated command line arguments to the start-up of "awk" to use common libraries of routines.

4. The new script is soooo much easier as it figures out the correct path to the plug-ins (as long as the "uu" script is in the same fiolder as the plug-ins.

 

You can edit the "uu" script if you like, changing  "break" to "continue" where it says "Process killed" and it should work as it used to do with the User-scripts button.

The attached plugin worked great to fix my file list on the main page.  Thank you very much!!

You are welcome.  You will see at the top of its awk script it has the menu and status areas disabled.

 

Have fun...

Joe L.

Link to comment
  • Squid locked this topic
Guest
This topic is now closed to further replies.