MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal TV-Server 1 » General Talk


General Talk Talk about the MediaPortal TV-Server

Reply
 
LinkBack (1) Thread Tools Display Modes
Old 2007-04-30, 09:24   1 links from elsewhere to this Post. Click to view. #1 (permalink)
Portal Member
 
Join Date: Jan 2006
Location: Grenoble - France
Age: 46
Posts: 10
Thanks: 0
Thanked 3 Times in 1 Post

Country:


Default Powerscheduler with Server/Client system

After having installed the MediaPortal TV Server (dear development team: A great bravo and thank you for your outstanding work) I touched the problem that I have to keep my server switched on 24 hours/day, 7 days/ week, while I need it only a few hours per day. Looking in the Powerscheduler, I saw that this one can only handle a single seat configuration, but not my config with 1 server and 4 clients.

So I was searching for a work-around, and I wanted to share with you what I have installed (and for me it’s running fine).

Idea was to use the possibility of the Powerscheduler which is integrated in the TV Server to check for running processes. This means that every client has to start his own process on the server when he is logging in, and kill this process when he is logging out.


Sample-configuration :
Server: PC250
Client 1: PC001
Client 2: PC002
Client 3: PC003

We need to download two programs (freeware) :
Pstools: http://www.microsoft.com/technet/sys...s/pstools.mspx
wolcmd: http://www.depicus.com/download.aspx...ct=commandline

Out of the PsTools we need only the programs PsExec and PsKill.
The program wolcmd is for waking up the server from hibernate or suspend.

For each client we create a unique exe file in this directory of the Server. For this we can take any Windows program which can be executed in several instances in parallel, no functionality is needed, we need only processes. A simple one is calc.exe (you can find it in the \system32\ folder), or use this wonderfull attached program (client1active.exe) which I have written during long hours (1 line source-code) which only right to exist is to exist. It’s doing nothing but waiting for being killed (your can “kill” it with any key). For each client you create a new copy:
Client1: Client1active.exe
Client2: Client2active.exe
Client3: Client3active.exe
Etc.

These files you locate in your Powerschedule directory of the Server (let’s say “F:\PowerScheduler”).
Now you have to create a batchfile for each program:

Client1active.bat:
START /min client1active.exe

Client2active.bat:
START /min client2active.exe

Etc.

Having done this we have to integrate these processes in the Powerscheduler as processes which prevent the system to enter in standby. (For this the processes has to be started.)

Finally you have to create a new user on the server. Let’s call him “client” and give him a password (password is needed, because Win XP does not allow remote access without password).


On each Client you create a start directory for MediaPortal on your Clientcomputer :
“C:\MPStart\”
In this directory you copy your program PsExec, PsKill and wolcmd and create a batchfile to start MediaPortal (MPStart.bat):

wolcmd [mac address] [ip address] [subnet mask] [port number]
psexec \\pc250 -u client -p password -i F:\powerscheduler\clientxactive.bat
"C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal.exe"
pskill \\pc250 -u client -p password clientxactive.exe"

pc250 is the name of the server
password is the password of the user “Client” on the server.
the x has to be replaced by the number of the client
the “F:\Powerschedule\” has to be the directory you’ve created above.

That’s all: instead of starting MeadiaPortal directly, you start the batchfile, which is starting the Server, starting on the server the clientxactive process and starting MediaPortal afterwards.
The Server is staying awake till we kill the process clientxactive, which will be done when you close Mediaportal on the client.

Only open problem remains a dedicated MediaPortal client, on which MediaPortal is running permanently and for stopping the computer is send to hibernate only. For this configuration the above procedure does not work. Here we need a smart little program called

Hibernate Trigger: http://www.rpi.edu/~desimn/suspendtrigger/
The wonderful program is executing commands before entering in hibernation (or suspend) and when waking up from hibernation (or suspend).

We create a small batch called afterhibernate.bat:

C:\mpstart\wolcmd [mac address] [ip address] [subnet mask] [port number]
C:\mpstart\psexec \\pc250 -u client -p password -i F:\powerscheduler\clientxactive.bat

And another one called beforehibernate.bat
C:\mpstart\pskill \\pc250 -u client -p password clientxactive.exe"

And these batches we are putting in the adequate places of Hibernate Trigger and it’s done.

Enjoy.
Attached Files
File Type: zip Client1active.zip (4.3 KB, 56 views)
frenchi38 is offline   Reply With Quote
3 Users Say Thank You:
Old 2007-06-10, 07:50   #2 (permalink)
Portal Member
 
Join Date: Apr 2006
Location: Munich
Age: 35
Posts: 268
Thanks: 3
Thanked 1 Time in 1 Post

Country:


Default

Hi,

works great, i only have one problem:

after wol the server starts but isnt fast enough. so the psexec command fails. How can make a pause or wait between wolcmd and psexec?


Quote:
Originally Posted by frenchi38 View Post
wolcmd [mac address] [ip address] [subnet mask] [port number]
psexec \\pc250 -u client -p password -i F:\powerscheduler\clientxactive.bat
Cheers

Skar
__________________
Server: Asus Pundit P1-AH2 Athlon64 3200+/ 1024 MB DDR2-667/ 2x 250GB Samsung SP/Hauppauge PVR 150/ Floppy DTV-C/Alphacrypt Light/ Hauppauge Nova T/Geforce 6150

Client1: Thermaltake Mozart 7000 SX/ Athlon64 3700+/ ASRock DualSata2/ 2048 MB DDR400/ 80 GB Samsung / Theatron 7.1 DD / Geforce 7100/Cyberlink Codec

Client2: Ahtlon XP1700+/MSi Mega 180, nforce2 based/ GeForce MX440 onboard/ 768 MB DDR333/ 8 GB Transcend Compact Flash
Skar29 is offline   Reply With Quote
Old 2007-06-10, 10:38   #3 (permalink)
Portal Member
 
Join Date: Jan 2006
Location: Grenoble - France
Age: 46
Posts: 10
Thanks: 0
Thanked 3 Times in 1 Post

Country:


Default

Hi Skar,

1. possibility: see this link: http://www.bjoernhenke.de/frame.htm?/wait/index.de.htm
(Sorry only in German, but should be ok for you ;-)

2. possibility: ping -n x 127.0.0.1 > NUL
Where x is the time in seconds -1 for the pause. (x=5 means 4 secondes pause)

Cheers and enjoy.

Jens
frenchi38 is offline   Reply With Quote
Old 2007-06-30, 14:59   #4 (permalink)
Portal Member
 
Join Date: Nov 2006
Posts: 127
Thanks: 3
Thanked 4 Times in 4 Posts

Country:

My System

Default

Is this working on winxp home, I cant get PsExec to work???
Juppe is offline   Reply With Quote
Old 2007-07-01, 21:23   #5 (permalink)
Portal Member
 
Join Date: Dec 2006
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

Hi frenchi38,
thank you for your solution and description.
Regrettably i have a little problem:
WOL works fine, but couldn`t access the server PC.
I can not start the client1active.bat
No firewall is activ.
I use Port 7.

Have you a Idea?

Regards

Vernado
__________________
Vernado

My HTPC System:
Client
Freesytle Silverstone LC02B MINI HTPC Case
Asus M2NPV-VM 430-6150 DVI-HDTV/AMD X2 3800EE / 1024 DDR2 667 / Samsung 250GB HD/ 1 x Nova T /Twinhan DTV DVB-T mini (MCE2005) Nforce GLAN
37" Full HD LCD TV

TV Homeserver:
AMD Athlon X2 3800EE / 2048MB DDR / 430-6150 / GLAN/ 2 x 500HDDs/ 2 x Technistat SkyStar 2 und 1 x Skystar HD via Mediaportal TV Server EngineV3

Last edited by vernado; 2007-07-01 at 21:52.
vernado is offline   Reply With Quote
Old 2007-07-01, 22:14   #6 (permalink)
Portal Member
 
Join Date: Nov 2006
Posts: 127
Thanks: 3
Thanked 4 Times in 4 Posts

Country:

My System

Default

Hi vernado, what OS do you use, do you also have winxp home?
In that case I dont think it will work to start a program on a remote computer with PsExec. I may be wrong but I have search the net for a solution, but couldn't find any, so I made a little program for the server instead, that looks if any of the clients is on, in that case the server stays awake, but this is not so good if the clients aren't dedicated clients. On the clients a use wolcmd to wake the server and then the server looks for the clients every x minutes and as long as there is a client present the server stays awake.
If you're interested in this program let me know.

/Juppe
Juppe is offline   Reply With Quote
Old 2007-07-02, 07:30   #7 (permalink)
Portal Member
 
Join Date: Dec 2006
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

Hi Juppe,
i use WinXPMCE is like XpPro.
I am very interesting in you solution.
Regards

Vernado
__________________
Vernado

My HTPC System:
Client
Freesytle Silverstone LC02B MINI HTPC Case
Asus M2NPV-VM 430-6150 DVI-HDTV/AMD X2 3800EE / 1024 DDR2 667 / Samsung 250GB HD/ 1 x Nova T /Twinhan DTV DVB-T mini (MCE2005) Nforce GLAN
37" Full HD LCD TV

TV Homeserver:
AMD Athlon X2 3800EE / 2048MB DDR / 430-6150 / GLAN/ 2 x 500HDDs/ 2 x Technistat SkyStar 2 und 1 x Skystar HD via Mediaportal TV Server EngineV3
vernado is offline   Reply With Quote
Old 2007-07-02, 08:00   #8 (permalink)
Portal Member
 
Join Date: Nov 2006
Posts: 127
Thanks: 3
Thanked 4 Times in 4 Posts

Country:

My System

Default

I'm at work right now, so I will put up the program later today, when I'm at home.
Juppe is offline   Reply With Quote
Old 2007-07-02, 16:21   #9 (permalink)
Portal Member
 
Join Date: Nov 2006
Posts: 127
Thanks: 3
Thanked 4 Times in 4 Posts

Country:

My System

Default

Here is the program.
I will try to describe how to use it.
Place that program and ClientXActive.exe (from the first post here) ,but rename it to ClientActive.exe, in same folder and make a batch file.

START /min ClientCheck.exe [X] [ClientName1] [ClientName2]

X is the number of minutes between the check for clients, dont make this larger than the minutes that you have in powerscheduler.
ClientName1 is the name of one of the clients that shall keep the server alive.
There can be how many clients that you want, I havent checked with more than 2, but it should work with more.
Remember to put ClientActive.exe as a process in powerscheduler.

Change the name to .exe, its not a zip file.
I think thats all, let me know how it works and if you get any problem.
/Juppe
Attached Files
File Type: zip ClientCheck.zip (20.0 KB, 38 views)
Juppe is offline   Reply With Quote
Old 2007-07-02, 17:52   #10 (permalink)
Portal Member
 
Join Date: Dec 2006
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

Hi Juppe,
Thanks.
What does the ClientCheck.EXE do?
And how do you start the Server? Is is right that you doesnt need the PsExec.
That looks fine, because the PsExec dont work good.
I hope i can test it this evening.

Regards

Vernado
__________________
Vernado

My HTPC System:
Client
Freesytle Silverstone LC02B MINI HTPC Case
Asus M2NPV-VM 430-6150 DVI-HDTV/AMD X2 3800EE / 1024 DDR2 667 / Samsung 250GB HD/ 1 x Nova T /Twinhan DTV DVB-T mini (MCE2005) Nforce GLAN
37" Full HD LCD TV

TV Homeserver:
AMD Athlon X2 3800EE / 2048MB DDR / 430-6150 / GLAN/ 2 x 500HDDs/ 2 x Technistat SkyStar 2 und 1 x Skystar HD via Mediaportal TV Server EngineV3
vernado is offline   Reply With Quote
Reply

Bookmarks

Tags
powerscheduler, server or client, system

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

LinkBacks (?)
LinkBack to this Thread: http://forum.team-mediaportal.com/general-talk-233/powerscheduler-server-client-system-22721/
Posted By For Type Date
Power Scheluder Et Lecture Video Ou Musique - MP-FR .:: Le forum ::. This thread Refback 2008-07-28 21:39

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crash on client system SVN 13616 elliottmc pre 1.0 RC1 3 2007-03-29 19:02
PowerScheduler plugin and client. Juppe General Talk 5 2007-03-15 20:24
PowerScheduler sleeps system while recording swifty fixed 0.2.2.0 bugs 3 2007-01-16 18:14
TV-Server 3 Client verbindet sich nicht mit dem Server Netzdiver Media Portal - Support 13 2007-01-05 12:27


All times are GMT +1. The time now is 04:08.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress