spacer
spacer search

SwissCenter

Search
spacer
Main Menu
Home
Documentation + FAQ
Screenshots
Downloads
Forums
Bug Tracking
History
Login
Username

Password

Remember me
?
No account yet?

Locations of visitors to this page

 
Home arrow Forums

SwissCenter Forums  


SwissMonitor on Linux - 2009/03/07 12:58 Is it possible to have a Linux version of the SwissMonitor?

And just for my understanding, what's the difference of the actions taken by the SwissMonitor and a media refresh?

regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1221
Simese 1.46 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0803
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissMonitor - 2009/03/07 13:17 Is it possible to have a Linux version of the SwissMonitor?
SwissMonitor is a Windows application developed in C#. It would need a Linux devloper to convert this and create binaries for Linux distros.

And just for my understanding, what's the difference of the actions taken by the SwissMonitor and a media refresh?
SwissMonitor monitors media locations for new files being added and instantly adds them to the database, saving the need to open the SwissCenter config and performing a manual media search.
Players : Netgear EVA700 | Popcorn A-100 (100516) | Popcorn A-200 (100208)
Webserver : Simese v2.6.4 | Apache 2.2.16 | PHP v5.2.12 | MySQL v5.1.32
Server : Windows 7 Home Premium 64bit
Spec : Intel C2Q Q6600 - 4GB RAM - 4TB HDD
AV : Pioneer VSX-915 | Samsung LE40C650
  | | The administrator has disabled public write access.
Re: SwissMonitor on Linux - 2009/03/07 13:30 Nigel wrote:SwissMonitor monitors media locations for new files being added and instantly adds them to the database, saving the need to open the SwissCenter config and performing a manual media search.
So, is there any difference with an automatic media refresh?

regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1221
Simese 1.46 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0803
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissMonitor on Linux - 2009/03/07 15:04 Hi Klaas...

The only thing SwissMonitor adds is that it instantly adds and removes files. A media refresh does the same thing just not instantly.

We still have to run a scheduled scan because, for instance, it is necessary to update the RSS feeds.
Showcenters 1000g/250HD/Popcorn Hour A-100
Netgear HDX101 Powerline Adapters
Windows XP SP3 Simese 2.6.4 Beta SwissCenter latest SVN
NAS Server Intel PD 2.66Ghz/2GB Mem/1.5TB Storage
Hauppauge HVR 1600 GB-PVR
  | | The administrator has disabled public write access.
Re: SwissMonitor on Linux - 2009/03/07 15:33 @Stu,

OK, capito, thanks for the explanation.


@all,

Nigel wrote:SwissMonitor is a Windows application developed in C#. It would need a Linux devloper to convert this and create binaries for Linux distros.
sounds complicated, any volunteers ...

regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1221
Simese 1.46 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0803
Pinnacle SC200
  | | The administrator has disabled public write access.
Re: SwissMonitor on Linux - 2009/03/14 19:55 Since it's written in C# it theoretically might run under Mono but I've no idea if that supports all of the bits SwissMonitor uses like file monitors and services.

If someone wants to write a version for Linux though the calls into SwissCenter to notify it immediately are pretty simple, it's the monitoring bit that might be a little more complex but I'm happy to go through the behaviour of the SwissMonitor with someone if they fancy giving it a go.

Also the full refresh is needed to pick up changes that happened if the SwissMonitor isn't running when they happened and to sort out any consistency issues that can occur in a few rare cases.
"The mysterious garfoot"

Server: Windows Home Server (HP MediaSmart EX470)
Players: Pinnacle Showcenter 200 & 1000
  | | The administrator has disabled public write access.
Re: SwissMonitor on Linux - 2009/06/14 14:20 To be frank, I think that both the scan and the monitor is the wrong approach for Linux. For one thing, you can't assume that all file systems are local -- there's NFS, which tends to make monitoring quite unreliable, even with a statd.daemon.

The bottlenecks are quite different on Linux -- what takes time is the PHP interpretation, not the file system scanning.

Example:

# time find /usr/storage/music -type f | wc -l
5683

real 0m0.040s
user 0m0.008s
sys 0m0.032s

That's 0.04 seconds in total to find and list all 5683 music files in a storage area. This is on a 2001 era PIII machine, and old PATA drives.

In Linux, one can take advantage of the much faster file system access. A diff of two complete finds would identify every new or deleted file, and a find with a "-newer /last/scanned" parameter would find all changed files.

A test I wrote in /bin/sh doing just this completed updating in about 1 second, unless there were massive changes. The reason why I didn't pursue it further was that it could cause conflicts if run at the same time as media_search.php or database accesses from Swisscenter (add locking!).

What WOULD be very useful would be a php that would take two parameters -- the repository and a file name. And then add/update/delete that file depending on whether it exists or not.
  | | The administrator has disabled public write access.
Re: SwissMonitor on Linux - 2009/06/14 15:10 What WOULD be very useful would be a php that would take two parameters -- the repository and a file name. And then add/update/delete that file depending on whether it exists or not.

This is how SwissMonitor interfaces with SwissCenter.

SwissMonitor requests the URL /media_monitor.php specifying parameters that identify the file that has changed (and what type of change). SwissCenter then processes the file accordingly.

eg: /swiss_monitor.php?type=Added&path=%2Fusr%2Fstorage%2Fmusic%2Fsong.mp3

It would be simple to take the output from two file diffs and then use wget to "call" the media_monitor.php script with the correct parameters for all files added, updated or deleted.
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)


  | | The administrator has disabled public write access.
Re: SwissMonitor on Linux - 2009/06/15 18:52 Does this mean (in plain English) that we get a monitor for Linux on a short term ... ... would be great ...

regards, Klaas

---------------------------------------------------------------------------
SwissCenter SVN 1264
Simese 1.46 / PHP 4.4.4 / MySQL 4.0.21 / Windows XP
Apache 2.2.8 / PHP 5.2.6 / MySQL 5.0.51b / Linux Synology 2.6.15
Synology DS107+ (128), firmware: DSM 2.0-0803
Pinnacle SC200 / PCH A-110
  | | The administrator has disabled public write access.
spacer
 

Screenshots

www.flickr.com
This is a Flickr badge showing public photos from swisscenter. Make your own badge here.


 

Mambo is Free Software released under the GNU/GPL License.
spacer