Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Przeniesienie danych pomiedzy kilkoma dyskami.
saren_as
post
Post #1





Grupa: Zarejestrowani
Postów: 53
Pomógł: 0
Dołączył: 21.07.2008

Ostrzeżenie: (0%)
-----


Witam!
Musze napisac taki skrypt, ktory przeniesie z osmiu 500GB HDD pomiedzy siebie dane. Chodzi o to, iz sa to dane uzytkownikow (okolo 800), a celem jest, aby na kazdym byla taka sama ilosc danych oraz liczba uzytkownikow (oczywiscie mniej wiecej). Czy jest na to jakis gotowy skrypt, bo nie wiem za bardzo jak tego szukac. Jest to bardzo ciezkie do zrobienia? Dopiero zaczynam sie uczyc wszystkiego wiec nie wiem za bardzo gdzie mam zaczac.

Prosze o jakies porady bo jest to dla mnie bardzo wazne!
Z gory dziekuje i pozdrawiam!
saren_as
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
dadexix
post
Post #2





Grupa: Zarejestrowani
Postów: 439
Pomógł: 21
Dołączył: 28.06.2007
Skąd: Bielsko-Biała

Ostrzeżenie: (0%)
-----


rozumiem że masz dostęp do shell'a, więc może lepiej użyć pythona/basha?
Go to the top of the page
+Quote Post
saren_as
post
Post #3





Grupa: Zarejestrowani
Postów: 53
Pomógł: 0
Dołączył: 21.07.2008

Ostrzeżenie: (0%)
-----


hmm... jest mi poprostu potrzebne cos takiego co wykona za mnie cala robote? Sorry za "mnie", ale jestem poczatkujacy, a bardzo mi to potrzebne.

Witam ponownie. Troche juz sie dowiedzialem, wiec teraz bede Was tylko pytal o "drobne" rzeczy...narazie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Mam takie tabele:

CREATE TABLE `vservers_status` (
`vserver_ip` varchar(15) NOT NULL default '',
`filer_id` int(10) unsigned NOT NULL default '0',
`node_id` int(10) unsigned default NULL,
`started` tinyint(1) NOT NULL default '0',
`cpu_parts` int(10) unsigned NOT NULL default '0',
`cpu_usage` int(10) unsigned NOT NULL default '0',
`mem_size` int(10) unsigned default NULL,
`mem_usage` int(10) unsigned NOT NULL default '0',
`disk_size` int(10) unsigned default NULL,
`disk_usage` int(10) unsigned NOT NULL default '0',
`net_usage` bigint(20) unsigned NOT NULL default '0',
`_net_last` bigint(20) unsigned NOT NULL default '0',
`mem_usage_as` int(10) unsigned NOT NULL default '0',
`mem_size_as` int(10) unsigned NOT NULL default '0',
`net_usage_down` bigint(20) unsigned NOT NULL default '0',
`_net_last_down` bigint(20) unsigned NOT NULL default '0',
`net_usage_up` bigint(20) unsigned NOT NULL default '0',
`_net_last_up` bigint(20) unsigned NOT NULL default '0',
`date_created` datetime default NULL,
`last_modified` timestamp(14) NOT NULL,
PRIMARY KEY (`vserver_ip`),
UNIQUE KEY `index01` (`vserver_ip`)
) TYPE=InnoDB;
i

CREATE TABLE `filers` (
`filer_id` int(10) unsigned NOT NULL auto_increment,
`mount_point` varchar(255) NOT NULL default '',
`hostname` varchar(50) NOT NULL default '',
`production` tinyint(1) NOT NULL default '0',
`running` tinyint(1) NOT NULL default '0',
`fs_size` int(10) unsigned NOT NULL default '0',
`fs_usage` int(10) unsigned NOT NULL default '0',
`mem_size` int(10) unsigned default NULL,
`mem_usage` int(10) unsigned default NULL,
PRIMARY KEY (`filer_id`)
) TYPE=MyISAM;

Jak zbudowac SELECT, aby wyswietlilo mi
vserwer_ip z filer_id o wartosciach >= 5
+
ilosc wolnego miejsca na filer_id o wartosci 1 (czyli: fs_size - fs_usage WHERE filer_id = 1)

Da rade to zrobic w jednym selekcie czy musze to zbudowac jako dwie zmienne?

Dzieki za rady i przepraszam za brak polskich znakow, ale nie mam polskiej klawiatury!
Pozdrawiam!
saren_as

Ten post edytował saren_as 10.09.2008, 19:15:33
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.12.2025 - 20:43