General :: Understanding Idle/Inactive Sessions And Whether Or Not Someone Is Logged In?
Jan 5, 2011
I'm trying to understand if anyone is left on a server. Basically I manage a simple linux server remotely used by 3-4 individuals. I can never tell if someone is actually on or not using w/who.What I'm seeing is some people having what appears to be inactive/lost VNC sessions. I don't understand idle fully, but I do believe a program (without user interaction) can clear idle back to 0, correct?Anyway, I'm asking because every now and then I need to reboot the server, and I do not want to interrupt any program working on calculations or waiting on having the data saved.
Code:
me@matrix:~> w
06:59:54 up 170 days, 9:13, 16 users, load average: 0.52, 0.16, 0.06
I have a written a test script which retrieves the status of active and inactive sessions from oracle DB, but i am receiving error while executing.My script is
I was doing some rather lengthy procedures using a terminal. Then I wrote script using Kate, and input it into that terminal, and then realized that I was logged in as a normal user in that terminal as opposed to a superuser, which is how I was logged in at the other terminal. I've never noticed this before because I've never done anything that takes this long.
Is there any way to link all terminal sessions in such a way that they all show me logged in as the same user? I don't even know if this is even important, but I don't want to risk losing any things that I had done.
I run pidgin instant messenger via fbpanel taskbar via fluxbox window manager via xvnc vnc server via xrdp remote desktop terminal via sesman session manager.
One problem I've found is that Pidgin does not detect when I stop mousing or typing. I also run gnotime time tracker and it too is not able to detect when I don't type on the keyboard or move the mouse in my X-Windows.
Some questions:Is there a common problem? Is there a workaround? Is there a way to diagnose the problem?perhaps a program which says which window got the input which resets the idle timeout
Is there a way to examine or record the idle periods?
I am learning how to use DD for creating images across networks and locally but needed some clarification. 1 - When creating an image, I noticed that there is no verbose to show you the progress, How can I accomplish this?
2 - When I run this on a 8G usbstick it takes a long time to image. How can I speed up this process? PHP Code: dd if=/dev/sdb of=/home/test/images/image.dd
3 - When an image is restored like PHP Code: dd if=/home/test/images/image.dd of=/dev/sdb will that give me a working bootable usbstick? For example if I imaged a working usbstick with Ubuntu on it using DD and restored it like the example above on a different usbstick, will this give me a booting new usbstick? I hope that came across ok?
I don't quite understand how pipes work in bash. I know that it takes an output from one command as the input in another command. What an output is I can get because it's what the command prints out to the screen. But how do I know what input a command will take? Here is an example I thought would work:
Which gem | rm Unfortunately it didn't. Which gem prints out "/usr/bin/gem" so that must be the output right? I thought that was given to rm so it would be "rm /usr/bin/gem" but I was wrong. How do I know what input a command takes?
I'm trying to set up a machine to "drive" a piece of equipment (a metal plate embosser [kind of like a daisywheel printer for credit card sized pieces of metal], FWIW). What I ideally want is a linux distro that I can boot from CD (I think the term is Live CD?), log itself in as a user and display only a console. It needs to be able to support windows fileshares and python.
Essentially it needs to boot, connect to a single fileshare on a Win2k8 machine, and be able to execute a couple of scripts that will output to a serial port. One of them will be more or less the following:
wget http://WEBSITE/?<parameter passed to script> --quiet --output-document=<name of serial port>
The other is a somewhat more complicated Python script that processes a CSV spreadsheet and produces data for the machine.
I'm beginning to deal with more than one user on my system (it's a VPS serving some sites) and I need to make sure I understand how group permissions work. I have an account named "admin" .. it's basically the primary account that is used for serving most of the sites that I control myself. Now, I added a second account named "Ville" as one of my users wants to be able to administer that site. So, I can do this the easy way and just chown their domains folder under the ville user, they have permission to do whatever they need be and so forth. However, let's say I want to also give the admin user access to the files (modifying and all) .. how can I put both users into the same group and give them both permission?
I've tried doing: sudo usermod -a -G admin ville To add the ville into the admin group, but ville still cannot edit files by admin. Permissions for the primary directory for the ville user are read/write for both owner and group, and the current group for the files is admin:admin .. But ville still can't write into the directory. So, what should I be doing here to get this right and secure at the same time?
I am suppose to explain the dependencies that exist and each of the following lines of makefile. Lists orders to be executed as a result of running the make utility on it.
I am very new to linux. The first time i ran a linux machine was one Saturday. Anyway I am trying to set up an apache web server, all I want to do is play around with html and post it on my unbuntu server so it is available to the internet. I am also trying to install samba but I am having trouble with that so for now I am using winscp. Ok, so I made a folder in my home directory for webstuff, and set up apache to look in that folder.
mkdir /home/username/webstuff I put my index.html file into the /webstuff folder. But when I go to my website, it says 403 error unable to access "/"
Did I make the folder in the right place? I do not want people being able to access my / folder so maby I made the web stuff folder in the wrong place? Also I thought I would just put my inded.html file inside of the default one apache gives you, but when I tried to transfer index.html it said permission denied. How to set up permissions so I can use apache and transfer my html files from my remote desktop to my server would be great!
After booting, my RAID1 device (/dev/md_d0 *) sometimes goes in some funny state and I cannot mount it.
* Originally I created /dev/md0 but it has somehow changed itself into /dev/md_d0. # mount /opt mount: wrong fs type, bad option, bad superblock on /dev/md_d0,
[code]...
In /proc/partitions the last entry is md_d0 at least now, after reboot, when the device happens to be active again. (I'm not sure if it would be the same when it's inactive.)
Resolution: as Jimmy Hedman suggested, I took the output of mdadm --examine --scan: ARRAY /dev/md0 level=raid1 num-devices=2 UUID=de8fbd92[...]
and added it in /etc/mdadm/mdadm.conf, which seems to have fixed the main problem. After changing /etc/fstab to use /dev/md0 again (instead of /dev/md_d0), the RAID device also gets automatically mounted!
As you can see they now show up as inactive. And for some reason sdi1 and sdh1 are not even listed. What can I do to get them back? To make matters worse I placed some important data on them, and even if I was clever enough to keep an extra copy on another drive, guess which drive that was? So, I need to get them activated as is (at least so I can get the data of them) before I can rebuild them from scratch. I'm running Mandriva 2010.1 and rated tehm using the built in disk partitioner.
logging in a server through putty in the same network when i executed last command its showing system ip logged in time and logged out time the output as followsthis is my system oot pts1 xx.xx.xx day month date time in time out timeand similarly am geeting other than this likeroot :0day month date time still logged in this is from more than 3 days its logged in
how to log out an idle session. I was using putty to connect to a Debian machine to edit my .profile file. I got disconnected. Ideally I would want to log back into my own session. If anyone can let me know how to do it, please? If not I want to open a new session and then log off my first session (see below pts/0).
I have some heavy, long processes running on remote Linux machines. I use my laptop to SSH to these machine and run the processes from my couch.
BUT, when I want to shutdown my laptop, I am in trouble since the remote processes are killed.
I did my research and found out that "screen" is a great solution for me, it is! (As long as I don't SHUTDOWN my laptop). Isn't there a way to "persist" the "screen" sessions so I can shut it down and then re-attach to a session?
Usually we require vnc to take remote sessions. There was one another i think it was called xdrp or xrdp. I am asking this out of curiosity, is there any way to take remote sessions using http. Like in web conferencing, we invite users to join the conference and then we are able to share desktop. Is there any way to do this on one-to-one basis ? is such a technology exists for linux (for any disto) ?
I have a PC which I built ~3 years ago which had been running smoothly and silently until recently. Now, the CPU fan likes to spin up to 1200-1500 RPM even when it's idle, which is rather annoying. I have not made any recent changes (software-wise or hardware-wise) to it.
I installed the lm-sensors and hddtemp packages (via apt-get) and configured them. Here's a typical output at steady-state, where the computer's been idle for a while and the fans have been spinning for the same while:
These all seem fairly normal to me, so I'm perplexed as to why the fan continues to run at such a high RPM. What does the ALARM that's reported for in6 mean? Is it important? I've been playing around with the fancontrol daemon, trying to see if I could get better results than with the default fan management. Using the pwmconfig utility, I generated the following /etc/fancontrol file:
# Configuration file generated by pwmconfig, changes will be lost INTERVAL=10 DEVPATH=hwmon0=devices/pci0000:00/0000:00:18.3 hwmon1=devices/platform/it87.552 DEVNAME=hwmon0=k8temp hwmon1=it8718 FCTEMPS= hwmon1/device/pwm1=hwmon0/device/temp1_input FCFANS= hwmon1/device/pwm1=hwmon1/device/fan1_input MINTEMP= hwmon1/device/pwm1=35 MAXTEMP= hwmon1/device/pwm1=60 MINSTART= hwmon1/device/pwm1=180 MINSTOP= hwmon1/device/pwm1=100
This only sort of works—as soon as I enable the fancontrol daemon, the fan shuts off at first (good), but the temperatures of the 7 different sensors slowly rise, even when everything is idle. Eventually, when the Core0 Temp sensors goes past 35°, the fan comes back on, and then it alternates from being on and off at around 500-700 RPM, as the temperature goes back and forth across the boundary. It's certainly much more pleasant than 1200-1500 RPM, but it's still far from desirable.
Here's an example of the sensors output in that situation: $ sensors k8temp-pci-00c3 Adapter: PCI adapter Core0 Temp: +36.0°C Core0 Temp: +38.0°C Core1 Temp: +34.0°C Core1 Temp: +30.0°C it8718-isa-0228 Adapter: ISA adapter ..... cpu0_vid: +1.100 V
I opened up the case, and the CPU heat sink felt warm but not excessively hot. I tried taking off the heat sink, cleaning off the thermal paste, putting on new thermal paste, and putting the heat sink back on, but that didn't seem to have much of an effect, if any. The two other heat sinks—one on the built-in AMD 780G graphics chipset and the other on the AMD SB700 southbridge—felt noticeably hotter than the CPU heat sink. So, my question is this: What should I do to get this computer back to the state where the fan is off when it's idle? Can I solve this with a smarter fancontrol configuration?
I cleaned out the heat sink and fan as best I could with compressed air (there wasn't a whole lot of dust, but I got rid of what I could), but still no dice. Rebooting into the BIOS configuration gives me the same results—the fan still runs at 1100-1200 RPM, and the system and CPU temperatures are reported as 40-44°C. Should I add another fan? The integrated GPU and the SB heatsinks felt significantly warmer to the tough than the CPU heatsink. The BIOS reports a system fan speed and NB fan speed of 0 rpm (since I don't have more than one fan).
I want to get the system idle time till a mouse move or a key press. How is it possible to get it from a char terminal running through ssh/telnet as well as a from an X-terminal session?
Suppose I am almost sure that from last Thursday, 3.00pm up to the same day at 10.00pm I was away from the machine, but not absolutely sure. Linux probably knows better than me. Maybe there will be a text file from which I could infer the keyboard was idle from Thu 2.40pm up to 11.10 pm. In this case, I would reach absolute certainty. But where could such file be in the /. tree or what could its name be (for in the latter case an updatedb followed by locate would do)?
I am no longer working on the Linux-machine directly, but I'm using Windows puTTY to get a terminal-session. Within that puTTY window I want to switch (or maybe create first) several sessions between which I can switch arbitrarily. I have read about using Ctrl-Alt-Fn, which doesn't work, most likely due to the puTTY interface. I have tried chvt n, which doesn't do anything either (or that it seems). I have tried "bash &" and got bash in the background, which I could call forth using fg, but then had to stay with that and couldn't switch anywhere. Only option was "exit". So, what's the correct way to get several sessions in that puTTY window and switch between them?