Thursday, December 24, 2015

What is multitenancy - logically isolated- physically maynot be


Multitenancy is a reference to the mode of operation of software where multiple independent instances of one or multiple applications operate in a shared environment.

The instances (tenants) are logically isolated, but physically integrated.

The degree of logical isolation must be complete, but the degree of physical integration will vary.

The more physical integration, the harder it is to preserve the logical isolation.

The tenants (application instances) can be representations of organizations that obtained access to the multitenant application (this is the scenario of an ISV offering services of an application to multiple customer organizations).

The tenants may also be multiple applications competing for shared underlying resources (this is the scenario of a private or public cloud where multiple applications are offered in a common cloud environment).

ISV - independent software vendor

get remote host volumes in gluster

How do you get remote node's gluster volume(s):

gluster volume info --remote-host=gfvm4

yes , --remote-host= plays the key part here ;)

Monday, December 14, 2015

SIGTERM vs SIGKILL and some more


kill will send SIGTERM signal
- may stop OR not.
- may be ignored.

kill -9 will send SIGKILL signal
- carries little more weight than SIGTERM
- 9 indicates SIGKILL-  CANNOT be ignored by process
-  SIGKILL directly goes to the init process.
   - init will stop the process.

Processes into "uninterriptible sleep"(D state) cannot be killed by kernel either. Reboot is required.

SIGKILL: Terminates a process immediately. This signal cannot be handled (caught), ignored or blocked. (The "kill -9" command in linux generates the same signal).

SIGTERM: Terminates a process immediately. However, this signal can be handled, ignored or caught in code. If the signal is not caught by a process, the process is killed. Also, this is used for graceful termination of a process. (The "kill" command in linux if specified without any signal number like -9, will send SIGTERM)

SIGINT: Interrupts a process. (The default action is to terminate gracefully). This too, like, SIGTERM can be handled, ignored or caught. The difference between SIGINT and SIGTERM is that the former can be sent from a terminal as input characters. This is the signal generated when a user presses Ctrl+C. (Sidenote: Ctrl+C denotes EOT(End of Transmission) for (say) a network stream)

SIGQUIT: Terminates a process. This is different from both SIGKILL and SIGTERM in the sense that it generates a core dump of the process and also cleans up resources held up by a process. Like SIGINT, this can also be sent from the terminal as input characters. It can be handled, ignored or caught in code. This is the signal generated when a user presses Ctrl+\.

SIGSTP: Suspends a process. This too, can be handled, ignored or blocked. Since it does not terminate the process, the process can be resumed by sending a SIGCONT signal. This signal can be generated by pressing Ctrl+Z. (Sidenote: Ctrl+Z stands for substitute character which indicates End-of-File in DOS)

SIGHUP: (From Wikipedia): Hangs up a process when the controlling terminal is disconnected. This especially relates to modem/dial in connections. A process has to explicitly handle this signal for it to work. A good use is to "poke" a process and letting the process (as defined by the programmer) decide what to do with the signal is described here. Hence, SIGHUP can be handled,ignored or caught. This is the signal generated when a user presses Ctrl+D.


symbolic link affecting program behaviour

symbolic links affect program behaviour ? how?

In a C program, the command line is stored in argv, which is short for argument vector.

The progam's name is the first element of argv, i.e. argv[0].

Clearly in the case of halt and reboot, the program is changing its behavior based on argv[0].

# reboot

ps -p -o cmd or cat /proc/cmdline.

so in program depending upon argv[0] behaviour changes !


deleting a forked repo from github

 deleting a forked repo from github :

By far the easiest way is to log in gitHub account:
  1. Click to your repository {for example yourUsername/yourRepository for example igort/vuk}
  2. Then in the main toolbar of github click on Settings
  3. Scroll just a little bit down and you will find Delete this repository button
  4. When you click it another pop up will appear here you need to type in the name of your repository and click on the button below which says: I understand the consequences, delete the repository

setting evince as default pdf viewer

setting default viewer for an application:

for example, you want to set "evince" as the default pdf viewer for any pdf document.

go to properties -> open-with -> select the program (evince in our case) -> set as default.

thats it, any time you open any pdf it will open using evince application :)

I think this should be applicable for all Linux distros, but I use fedora by default ;)

Thursday, December 10, 2015

nfs server error

rpc.nfsd[4115]: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)

Are you getting the above error while starting nfs server?

well, you need to manually start rpcbind service...then start nfs server.

Friday, December 4, 2015

Canon IP2870 reset Ink level and orange light meaning

Canon ip2870

This helps, So...
Canon IP2870 – Error Codes
Error Code    Description
Two flashes    Machine is out of paper or paper does not feed.
Three flashes    Paper jam.
Four flashes    The cartridge is not installed properly.
Five flashes    The cartridge is not installed properly.
Seven flashes    The cartridge is not installed in the correct position.
Eight flashes    Ink absorber is almost full.
Thirteen flashes    The remaining ink level cannot be detected.
Fourteen flashes    The cartridge cannot be recognised.
Fifteen flashes    The cartridge cannot be recognised.
Sixteen flashes    The ink has run out.

Canon IP2870 – Reset Ink Levels on the Cartridges

The Canon IP2870 cannot physically see inside the cartridges to find out how much ink is left. The copper contacts on the outside of the cartridge contain the ink level information. It is not possible to reset the ink levels to full. If you refill your cartridge, the printer will always show an empty cartridge message.

You can override the empty cartridge message by holding down the “stop / reset” button on the printer for around five seconds. The printer should continue printing, and use any of the remaining ink in the cartridge.

If the printer thinks that both cartridges are empty, you will receive a second error message, and you will need to hold the button for another five seconds.

If the circuitry on the cartridges is actually damaged this process will not work.