You are not logged in.

#126 2012-06-11 13:46:44

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Gravsky...i'm having little problems with psd and systemd...I solved my previous issue(asd page) by a psd.timer that will start psd after 25seconds from bootup, otherwise it takes really looong time to start.
But now...it says /tmp/federico-chromium is 0Mb...only 700kb...how can it be? But i can use my chromium as always.
Anyway some posts ago(asd thread), i told you i've got 71Mb.

systemctl status psd.timer 
psd.timer
	  Loaded: loaded (/etc/systemd/system/psd.timer; enabled)
	  Active: active (elapsed) since Mon, 11 Jun 2012 15:29:07 +0200; 19min ago
systemctl status psd.service 
psd.service - Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers
	  Loaded: loaded (/usr/lib/systemd/system/psd.service; disabled)
	  Active: active (exited) since Mon, 11 Jun 2012 15:37:54 +0200; 10min ago
	 Process: 1541 ExecStop=/usr/bin/profile-sync-daemon unsync (code=exited, status=0/SUCCESS)
	 Process: 1557 ExecStart=/usr/bin/profile-sync-daemon sync (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/psd.service

Jun 11 15:37:54 arch su[1559]: pam_unix(su:session): session opened for user federico by (uid=0)
Jun 11 15:37:54 arch profile-sync-daemon[1557]: mv: impossibile spostare "/home/federico/.config/chromium" in "/home/federico/.config/chromium-backup/chromiu... non vuota
Jun 11 15:37:54 arch profile-sync-daemon[1557]: [126B blob data]
Jun 11 15:37:54 arch su[1564]: pam_unix(su:session): session opened for user federico by (uid=0)

the line "impossibile spostare" means cannot move .... not empty.
Any idea?
EDIT: tried rebooting with psd.service and not psd.timer...same result. This time 8kb synced:

df -h
File system     Dim. Usati Dispon. Uso% Montato su
rootfs          231G   37G    192G  17% /
/dev/root       231G   37G    192G  17% /
devtmpfs       1006M     0   1006M   0% /dev
tmpfs          1006M     0   1006M   0% /dev/shm
tmpfs          1006M  1,9M   1004M   1% /run
tmpfs          1006M     0   1006M   0% /sys/fs/cgroup
tmpfs           600M  8,0K    600M   1% /tmp

I use the default /tmp...

Last edited by nierro (2012-06-11 13:51:56)

Offline

#127 2012-06-11 14:06:27

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Uhm misteriously, i found out that /home/federico/.config/chromium is 78Mb...so, what is psd syncing? My psd.conf isn't changed, and there is my username and "chromium" in the browsers...
EDIT: tried by /usr/bin/profile-sync-daemon unsync and next sync...nothing change.
Here is the output:

sudo /usr/bin/profile-sync-daemon unsync
mv: impossibile spostare "/home/federico/.config/chromium" in "/home/federico/.config/chromium-backup/chromium": Directory non vuota
ln: creazione del collegamento simbolico "/home/federico/.config/chromium/federico-chromium" non riuscita: File già esistente
sudo /usr/bin/profile-sync-daemon sync
mv: impossibile spostare "/home/federico/.config/chromium" in "/home/federico/.config/chromium-backup/chromium": Directory non vuota
ln: creazione del collegamento simbolico "/home/federico/.config/chromium/federico-chromium" non riuscita: File già esistente

In english, it means : mv: cannot move "/home...." directory not empty; and ln: creation of symbolic link failed: file already exists.

Last edited by nierro (2012-06-11 14:33:55)

Offline

#128 2012-06-11 22:15:40

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,613
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@nierro - Not sure what the problem is.... if you stop psd, then look at your ~/.config/chromium is it a symlink or a physical directory?  Are there any symlinks in that dir?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#129 2012-06-12 08:31:41

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

After an /usr/bon/profile-sync-daemon unsync, i can see in my home, that .config/chromium/federico-chromium still points to /tmp/federico-chromium...
And i have another question for you: should psd sync the whole directory .config/chromium? Because even if i do a sync, it seems that only .config/chromium/federico-chromium is sync'ed...and this is the problem i guess.

EDIT: i moved .config/chromium-backup and then

sudo /usr/bin/profile-sync-daemon sync
rsync: failed to set times on "/home/federico/.config/chromium/federico-chromium": Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]

What does it mean?
Thanks

Last edited by nierro (2012-06-12 08:33:25)

Offline

#130 2012-06-12 08:38:23

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Uhm it turns out i had some problems, may be changing from asd to psd? I had to remove .config/chromium-backup and .config/chromium/federico-chromium. Now no erros and df -h tells me i have 75Mb in tmp.
everything ok!
Thanks for your time!

Offline

#131 2012-06-13 00:02:56

njbair
Member
Registered: 2012-01-01
Posts: 5

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

To those who have had problems with rsync errors (i.e. posts #70, #129), I found the source of the issue for myself. I don't know about chromium, but google-chrome runs in the background even after you close the window. If you try to restart psd while google-chrome is running--even in the background--you will see these kinds of errors.

It would be nice if psd would detect this, but understandable that it does not.

Offline

#132 2012-06-13 01:41:41

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,613
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Never heard of that... I don't see chromium running when I close it.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#133 2012-06-13 02:42:15

njbair
Member
Registered: 2012-01-01
Posts: 5

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Again, I can't speak for Chromium. But Chrome keeps running so that apps and add-ons can do their thing and interact with the desktop environment (new mail notifications, etc.)

Offline

#134 2012-06-13 07:17:48

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Uhm my issue was caused by my psd.timer unit, that calls psd.service after 25seconds from bootup...but i'm stupid and then i open chromium before those 25s, and then if psd start syncing while chromium is open, probably it can't do its work!

Offline

#135 2012-06-13 07:19:48

neuromancer85
Member
Registered: 2011-12-12
Posts: 3

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

njbair wrote:

Again, I can't speak for Chromium. But Chrome keeps running so that apps and add-ons can do their thing and interact with the desktop environment (new mail notifications, etc.)

In Chromium it can be disabled in Settings->Show advanced settings->Background apps, in Chrome it should be the same.

Offline

#136 2012-06-13 10:42:39

njbair
Member
Registered: 2012-01-01
Posts: 5

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

There ought to be a way to make the init scripts fail more gracefully than this...perhaps it could grep the output of `ps -eo args` to find the names of supported browsers, and exit with an error instead of trying to continue if it finds anything. Just an idea.

Offline

#137 2012-06-13 11:33:59

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,613
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

njbair wrote:

There ought to be a way to make the init scripts fail more gracefully than this...perhaps it could grep the output of `ps -eo args` to find the names of supported browsers, and exit with an error instead of trying to continue if it finds anything. Just an idea.

Good idea!  Fork me on github; patches welcome.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#138 2012-07-27 09:46:33

mclang
Member
From: Finland
Registered: 2005-10-24
Posts: 60

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Whenever starting sync daemon (version 3.5-1) I got this kind of error:

profile-sync-daemon: line 16: [: mclang: binary operator expected

It seems that the line above should have double square brackets instead of single ones like this:

if [[ -z $USERS ]]; then

Same change at line 8 may be in order also?
Can this be included in next version or am I doing things in wrong way?


Duettaeánn aef cirrán Cáerme Gláeddyv. Yn á esseáth.

Offline

#139 2012-07-27 18:54:05

mikkie
Member
Registered: 2009-11-10
Posts: 52

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Can I run the profile-sync-daemon without the cron job in cron.hourly? Is the cron job absolutely necessary?

Offline

#140 2012-07-28 04:58:41

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,613
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@mclang - Fixed in 3.6, thanks.
@mikkie - No, but how do you propose that it stays current?  Leaving it to sync at boot and shutdown is risky.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#141 2012-07-28 09:05:08

mikkie
Member
Registered: 2009-11-10
Posts: 52

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

graysky, would you care to explain why it is risky if the profile-sync-daemon syncs only at boot and shutdown? Thanks.

Offline

#142 2012-07-28 09:31:47

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Because if you run out of power, you'll lose your profiles since last sync.
If you sync only during bootup, and then you, eg, hibernate for 10days in a row, and then you run out of power, you'll lose everything you changed in your profiles during those days.
While instead, sync'ing every hours will prevent this!

Offline

#143 2012-07-28 09:51:46

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,613
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

nierro wrote:

Because if you run out of power, you'll lose your profiles since last sync.
If you sync only during bootup, and then you, eg, hibernate for 10days in a row, and then you run out of power, you'll lose everything you changed in your profiles during those days.
While instead, sync'ing every hours will prevent this!

+1 wink


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#144 2012-07-28 17:37:30

mikkie
Member
Registered: 2009-11-10
Posts: 52

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Well, I don't use hibernate and shutdown my computer every night. So I think I will remove the cron job. Thanks for the info, guys!

Offline

#145 2012-07-28 17:55:54

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,613
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

Your system, your choice.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#146 2012-07-28 21:59:57

masteryod
Member
Registered: 2010-05-19
Posts: 433

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

mikkie wrote:

Well, I don't use hibernate and shutdown my computer every night. So I think I will remove the cron job. Thanks for the info, guys!

Just out of curiosity, what's wrong with cron job?

Offline

#147 2012-07-28 23:04:44

MadCatMk2
Member
Registered: 2010-05-10
Posts: 84

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

mikkie wrote:

Well, I don't use hibernate and shutdown my computer every night. So I think I will remove the cron job. Thanks for the info, guys!

You don't need to hibernate for a power failure to occur. 2c

Offline

#148 2012-08-04 08:24:49

PlaneTeeR
Member
Registered: 2012-08-04
Posts: 1

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

How do you safely remove the profile-sync-daemon?

Everytime after a computer shutdown firefox tells me there is no profile to be found. In my home I see the link to \tmp. I have to remove that and copy the .mozilla-backup to .mozilla to make it start again.

Last edited by PlaneTeeR (2012-08-04 08:25:14)

Offline

#149 2012-08-04 09:11:49

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

I think you should unsync your profiles, then remove the package. Otherwise, during shutdown, it will try to unsync the profile, but no command will be found (if your previously removed psd).

Offline

#150 2012-08-04 09:27:25

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,613
Website

Re: profile-sync-daemon - keep browser profiles in tmpfs and sync'ed

@Planteer - I made removal idiot proof.  Just remove it like any other package.  Here is the pre_remove function pacman will call for you:

pre_remove() {
	[[ -f /run/daemons/psd ]] && /etc/rc.d/psd stop
	[[ -f /run/psd ]] && profile-sync-daemon unsync
}

I do not understand why you are getting that firefox error... ;/


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB