Comandos DescPag – Parte 05.txt

oftware-RAID-HOWTO-5.html

|##########^ RAID ############################################################|

###############################################################################
# Repositórios: (Repository)
###############################################################################

===============================================================================
Repositório do Ubuntu:
===============================================================================

sudo vim /etc/apt/sources.list
_______________________________________________________________________________
SO: DUbuntu
Arquivo: vi /etc/apt/sources.list (Permissões: )
——————————————————————————
.
..

### Repositório do Skype (Skype Repository)
deb http://download.skype.com/linux/repos/debian/ stable non-fre

|———-^ Arquivo: /etc/default/squid ————————————-|

|==========^ Repositório do Ubuntu ===========================================|

|##########^ Repositórios ####################################################|

###############################################################################
# Scripts:
###############################################################################
===============================================================================
Scripts
>Scripts
Tags: Scripts
Ver: while, until

#### Exemplos de Scripts:

|<<<<<<<<<<<<<<<< ==== scripts ====
— Arquivo: criarquivo.sh ———
#!/bin/bash

for i in $(seq 5); do
>/tmp/arquivo$i;
echo arquivo$i criado;
done
echo
ls /tmp
|——————————^ criarquivo.sh ————–|

|<<<<<<<<<<<<<<<< ==== scripts ====
_______________________________________________________________________________
Arquivo: script-teste.sh
—————————————————————————————————
#!/bin/sh

echo -n “Quem sou eu: “
whoami

echo -n “O diretorio atual eh: “
pwd

echo -n “A data e hora do sistema atual eh: “
date

echo -n “A versao do Kernel do Linux eh: “
uname -r
|——————————^ Arquivo script-teste.sh —————————————————————————————————————————|

|<<<<<<<<<<<<<<<< ==== scripts ====
_______________________________________________________________________________
Arquivo: script-teste1.sh
—————————————————————————————————
#!/bin/sh

case $1 in
start)
echo “Voce digitou start”
;;
stop)
echo “Voce digitou stop”
;;
restart)
echo “Voce digitou restart”
;;
*)
echo “Voce nao digitou uma opcao valida”
;;
esac

### Cuidado com a falta das aspas quando usar -n e -z
if [ -n "$2" ]; then
echo “No \$2 voce digitou $2″
else
exit 0
fi
|——————————^ Arquivo script-teste1.sh ————————————————————————————————————————|

|<<<<<<<<<<<<<<<< ==== scripts ====

|==========^ Scripts =========================================================|

|##########^ Scripts #########################################################|

###############################################################################
# Teclas:
###############################################################################
>Teclas
>Teclado

(Fonte: http://www.vivaolinux.com.br/topico/Slackware/Caracteres-especiais-no-teclado-Linux)
### Caracteres especiais no teclado Linux

AltGr+q        /

AltGr+U        ↑
AltGr+u        ↓
AltGr+i        →
AltGr+y        ←

No Windows:

http://agentsmith.powerlinux.com.br/mapchar.htm

Alt 47        /
Alt 124        |

Mais tabelas:

http://www.creativehost.com.br/suporte/tabela-alt-de-codes-codigos-ascii-caracter-especial.htm

#### Referências:

http://www.demolinux.org/pt/versions/astuces.html

http://pt.wikipedia.org/wiki/Travess%C3%A3o

http://www.keepgeek.com.br/2010/07/09/os-segredos-da-tecla-alt-gr/

|##########^ Teclas ##########################################################|

###############################################################################
# Teclas de Atalho:
###############################################################################
>Teclas de Atalho

|<<<<<<<<<<<<<<<< #### Teclas de Atalho ####
===============================================================================
Teclas de Atalho no BASH:
===============================================================================

Ctrl+d — faz logout
Ctrl+l  — limpa a tela

|<<<<<<<<<<<<<<<< ==== Teclas de Atalho no BASH ====

|==========^ Teclas de Atalho no BASH ========================================|
|<<<<<<<<<<<<<<<< #### Teclas de Atalho ####

===============================================================================
Teclas de Atalho no Gnome:
===============================================================================

Alt+F2        — Run Application (Executar…)

### Para blequear a tela no Gnome:
Ctrl+Alt+L — Bloquear Tela
|<<<<<<<<<<<<<< #### Teclas de Atalho #### ==== Teclas de Atalho no Gnome ====

|==========^ Teclas de Atalho no Gnome =======================================|

===============================================================================
Teclas de Atalho no MacOS X:
===============================================================================

(Fonte: http://pplware.sapo.pt/apple/bloquear-o-mac-com-password-em-segundos/)
### Para bloquear a tela do Mac:
Ctrl + Shift + ⏏ (botão de ejectar)

|<<<<<<<<<<<<<<<< ==== Teclas de Atalho no BASH ====

|==========^ Teclas de Atalho no MacOS X ========================================|

Insert ASCII Control Characters in Text

http://www.bo.infn.it/alice/alice-doc/mll-doc/linux/vi-ex/node15.html

|##########^ Teclas de atalho ################################################|

###############################################################################
# Tecnologias
###############################################################################
>Tecnologias

IBM WebSphere:

http://olhardigital.uol.com.br/negocios/central_de_videos/criacao-de-portais-para-empresas-conheca-a-solucao-definitiva/15205

|##########^ Tecnologias #####################################################|

###############################################################################
# Troubleshooting Geral
###############################################################################
>Troubleshooting Geral

|<<<<<<<<<<<<<< #### Troubleshooting ####
——————————————————————————-
#### Análise de cabeçalho de mensagem:
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)

## Sintomas: (Symptom)

Received-SPF    fail (google.com: domain of usuario-sender@dominio-sender.com.br does not designate 200.200.34.13 as permitted sender) client-ip=200.200.34.13;

Authentication-Results    mx.google.com; spf=hardfail (google.com: domain of usuario-sender@dominio-sender.com.br does not designate 200.200.34.13 as permitted sender) smtp.mail=usuario-sender@dominio-sender.com.br

## Causa: (Cause)

Problema na confiuração do SPF ou tentativa de envio de spam.

## Solução: (Solution)

|—————————————————————————–|

|<<<<<<<<<<<<<< #### Troubleshooting ####

——————————————————————————-
#### Exemplo de troubleshooting:
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)

## Sintomas: (Symptom)

Ao tentar iniciar uma máquina virtual aparece o seguinte erro:

———————————————————
Nonexistent host networking interface, name ‘vboxnet0′
———————————————————

## Causa: (Cause)

## Solução: (Solution)

Foi necessário baixar o pacote o Virtualbox e reinstalá-lo com o comando:

rpm -Uvh VirtualBox-4.1-4.1.4_74291_openSUSE114-1.x86_64.rpm

|—————————————————————————–|

|<<<<<<<<<<<<<< #### Troubleshooting ####

——————————————————————————-
#### Exemplo de troubleshooting:
### Erros conhecidos: (Known Errors)
## Questão/Problema: (Question/Issue)

## Sintomas: (Symptom)

## Causa: (Cause)

## Solução: (Solution)

|—————————————————————————–|

|##########^ Troubleshooting Geral ###########################################|

###############################################################################
# Variáveis
###############################################################################
>Variáveis

Variáveis de ambiente (CLL p. 55-58, 320)

DISPLAY; (CLL p. 199)
[host]:display[.screen]
host – o server;
display – é a tela
screen – para quando tem mais de um monitor;

echo $DISPLAY

===============================================================================
EUID
>EUID
Variável EUID

### Variável com o USER ID do usuário conectado.

|==========^ Variável EUID ===================================================|

HOME

http_proxy
http_pproxy=http://username:password@host:port/

Como colocar exceções para a configuração de Proxy configurados na linha de comando?

$? – Variável de retorno; (CLL p. 332)

===============================================================================
LANG
>LANG
Variável LANG

locale -a

### Ubuntu:
LANG=”pt_BR.utf8″
LANG=”en_US.utf8″

#### Descrição:
- Altera o idioma utilizado no SHELL, por exemplo o idioma da saída de um comando.

### Para o idioma ficar em Inglês:
LANG=C

### Para o idioma ficar em Inglês com a codificação UTF-8::
LANG=en_US.utf8

### Para o idioma ficar em Português Brasileiro com a codificação ISO-8859-1:
LANG=”pt_BR.iso88591″

### Para o idioma ficar em Português Brasileiro com a codificação UTF-8:
LANG=”pt_BR.UTF-8″

LANG=”en_US.utf8″

#### Pesquisas:
diret?rio n?o UTF ISO pt_BR

#### Veja Também:
/etc/environment
LC_CTYPE=”en_US.utf8″
LC_NUMERIC=”en_US.utf8″
LC_TIME=”en_US.utf8″
LC_COLLATE=”en_US.utf8″
LC_MONETARY=”en_US.utf8″
LC_MESSAGES=”en_US.utf8″
LC_PAPER=”en_US.utf8″
LC_NAME=”en_US.utf8″
LC_ADDRESS=”en_US.utf8″
LC_TELEPHONE=”en_US.utf8″
LC_MEASUREMENT=”en_US.utf8″
LC_IDENTIFICATION=”en_US.utf8″
LC_ALL=

|==========^ Variável LANG ===================================================|

LANGUAGE=”pt_BR.iso88591:pt:en”
LC_ALL=”pt_BR.iso88591″

LC_ALL

http://focalinux.cipsga.org.br/guia/avancado/ch-pers.htm

|<<<<<<<<<<<<<<<< #### Variáveis ####

EDITOR — pada definir o editor de texto padrão
-

HISTSIZE — limite de armazenamento de comandos digitados
- O padrão é 500;
- 0 (zero) significa que é sem limite;
- Exemplo: export HISTSIZE = 1000

HISTTIMEFORMAT — formata o data e hora da execução de um comando
- Exemplo: export HISTTIMEFORMAT=”%F %T “

===============================================================================
PATH (CLL p. 58)
>PATH
Variável PATH

|<<<<<<<<<<<<<< ==== PATH ====
#### Tarefas:
————————————————
;) Tarefas:
——————————————————————————-
Que variável que guarda a lista de diretórios que o shell usa para encontrar arquivos executáveis?

R.: PATH

|—————————————————————————–|

↑– Tarefas
|<<<<<<<<<<<<<< ==== PATH ====
——————————————————————————-
O que a variável PATH contém?

|—————————————————————————–|

——————————————————————————-
Como deve-se executar um comando cujo o caminho não esteja definido na variável PATH?

|—————————————————————————–|

|<<<<<<<<<<<<<< ==== PATH ====

|==========^ Variável PATH ===================================================|

===============================================================================
PS1 (GCRB p. 82)
>PS1
Variável PS1

#### Descrição:
- PS significa: Prompt String
- Contém o string do prompt primário

### Mostra os processos que estão rodando no terminal virtual 1 (tty1):
ps t tty1

### Mostra os processos que estão rodando no terminal virtual 1 (tty1) em
## forma de árvore:
ps ef t tty1

ps ef t tty1 o ppid,pid,pcpu,comm

ps ef t tty1 o ppid,pid,user,euid,ruid,tty,sess,stat,pcpu,comm

#
# \h – para mostrar o nome host;
# \s – para mostrar o nome do Shell;
#

#### Veja Também:
/etc/environment

|==========^ Variável PS1 ====================================================|

===============================================================================
PS2 (GCRB p. 82)
>PS2
Variável PS2

#### Descrição:
- PS significa: Prompt String

#### Veja Também:
/etc/environment

|==========^ Variável PS2 ====================================================|

===============================================================================
PS3 (GCRB p. 82)
Variável PS3

#### Descrição:
- PS significa: Prompt String

#### Veja Também:
/etc/environment

|==========^ Variável PS3 ====================================================|

===============================================================================
PS4 (GCRB p. 82)
Variável PS4

#### Descrição:
- PS significa: Prompt String
- Contém o string a ser exibido no início de cada linha de comando processada durante um trace (rastreamento), que é ativido pela opção -x do comando set.

#### Veja Também:
/etc/environment

|==========^ Variável PS4 ====================================================|

===============================================================================
SHELL
Variável SHELL

#### Descrição:
-

#### Veja Também:
/etc/environment

|==========^ Variável SHELL ==================================================|

|<<<<<<<<<<<<<<<< #### Variáveis ####
TERM — tipo de terminal em uso;

===============================================================================
TMOUT
Variável TMOUT

#### Descrição:
-

#### Veja Também:
/etc/environment

|==========^ Variável TMOUT ==================================================|

===============================================================================
TMOUT
Variável TMOUT

#### Descrição:
-

#### Veja Também:
/etc/environment

|==========^ Variável TMOUT ==================================================|

↑↓– #### Variáveis ####

|##########^ Variáveis #######################################################|

↑– Variáveis
↓– VirtualBox

###############################################################################
# VirtualBox
###############################################################################
>VirtualBox
>VBox

http://forums.virtualbox.org/viewtopic.php?f=7&t=35248

Uninstalling old VirtualBox DKMS kernel modules [  OK  ]
Trying to register the VirtualBox kernel modules using DKMS [FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [  OK  ]

zypper search dkms

↑↓– #### VirtualBox ####

SIOCSIFADDR: No such device
vboxnet0: unknown interface: No such device
SIOCSIFNETMASK: No such device
vboxnet0: unknown interface: No such device
##### Troubleshooting:
#### Erros conhecidos: (Known Errors)
———————————————————————————————————————————————————————————————————————————————
### Erros conhecidos: (Known Errors) [Resolvido] [Solved]
## Questão/Problema: (Question/Issue)

Nonexistent host networking interface, name ‘vboxnet0′

## Erro: (Error)

Nonexistent host networking interface, name ‘vboxnet0′

## Causa: (Cause)

?

## Solução: (Solution)

Foi necessário reinstalar o pacote do VirtualBox
VirtualBox-4.1-4.1.4_74291_openSUSE114-1.x86_64.rpm no OpenSuse

|———————————————————————————————————————————————————————————————————————————––|

↑↓– #### VirtualBox ####

———————————————————————————————————————————————————————————————————————————————
### Erros conhecidos: (Known Errors) [Resolvido] [Solved]
## Questão/Problema: (Question/Issue)

Ao clicar no ícone do VirtualBox o programa não inicia.

Ao tentar iniciar o VirtualBox pela linha de comando aparece a mensagem
de erro abaixo.

## Erro: (Error)

Ao executar o comando “/usr/bin/VirtualBox” aparece a mensagem de erro
abaixo:

/usr/bin/VirtualBox: line 77: /usr/lib/virtualbox/VirtualBox: Permission denied
/usr/bin/VirtualBox: line 77: exec: /usr/lib/virtualbox/VirtualBox: cannot execute: Permission denied

## Causa: (Cause)

A permissão do arquivo “/usr/lib/virtualbox/VirtualBox” estava errada.

Permissão errada:
—————————————————————————–
-rwxr-x— 1 root vboxusers 31320 Nov  4 13:27 /usr/lib/virtualbox/VirtualBox
—————————————————————————–

Permissão correta:
—————————————————————————–
-rwsr-sr-x 1 root vboxusers 31320 Nov  4 13:27 /usr/lib/virtualbox/VirtualBox
—————————————————————————–

## Solução: (Solution)

Modifique as permissões com o comando:
—————————————————-
sudo chmod -v 6755 /usr/lib/virtualbox/VirtualBox
—————————————————-

|———————————————————————————————————————————————————————————————————————————––|

↑↓– #### VirtualBox ####

———————————————————————————————————————————————————————————————————————————————
### Erros conhecidos: (Known Errors) [Resolvido] [Solved]
## Questão/Problema: (Question/Issue)

Ao clicar no ícone do VirtualBox o programa não inicia.

Ao tentar iniciar o VirtualBox pela linha de comando aparece a mensagem
de erro abaixo.

## Erro: (Error)

Ao executar o comando “/usr/bin/VirtualBox” aparece a mensagem de erro
abaixo:
———————————————————————–
VirtualBox: Error -10 in SUPR3HardenedMain!
VirtualBox: Effective UID is not root (euid=1000 egid=100 uid=1000 gid=100)

VirtualBox: Tip! It may help to reinstall VirtualBox.
———————————————————————–

## Causa: (Cause)

A permissão do arquivo “/usr/lib/virtualbox/VirtualBox” estava errada.

Permissões erradas:
—————————————————————————–
-rwxr-xr-x 1 root vboxusers 31320 Nov  4 13:27 /usr/lib/virtualbox/VirtualBox
—————————————————————————–
ou:
—————————————————————————–
-rwxr-x— 1 root vboxusers 31320 Nov  4 13:27 /usr/lib/virtualbox/VirtualBox
—————————————————————————–

Permissão correta:
—————————————————————————–
-rwsr-sr-x 1 root vboxusers 31320 Nov  4 13:27 /usr/lib/virtualbox/VirtualBox
—————————————————————————–

## Solução: (Solution)

Modifique as permissões com o comando:
—————————————————-
sudo chmod -v 6755 /usr/lib/virtualbox/VirtualBox
—————————————————-

|———————————————————————————————————————————————————————————————————————————––|

↑↓– #### VirtualBox ####

http://www.dedoimedo.com/computers/virtualbox-clone.html

http://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvdi

|##########^ VirtualBox ######################################################|

↑– VirtualBox
↓– VMware

###############################################################################
# VMware
###############################################################################
>VMware

|##########^ VMware ##########################################################|

###############################################################################
# Glossário (Dicionário da Informática)
###############################################################################
>Glossário

===============================================================================
Glossário (Dicionário da Informática):
===============================================================================

|<<<<<<<<<<<<<<<< ==== Glossário (Dicionário da Informática) ====
——————————————————————————-
(Fonte: http://en.wikipedia.org/wiki/Data_buffer)
Buffer
>Buffer
Ver: Data buffer
- Um buffer é uma região de memória usada para armazenar dados temporariamente enquanto está sendo transferido de um lugar para outro (A buffer is a region of memory used to temporarily hold data while it is being moved from one place to another)
- A buffer often adjusts timing by implementing a queue or FIFO algorithm in memory, simultaneously writing data into the queue at one rate and reading it at another rate.
- Buffers are typically used when there is a difference between the rate at which data is received and the rate at which it can be processed, or in the case that these rates are variable, for example in a printer
- A buffer may be used when moving data between processes within a computer
|———-^ Buffer ———————————————————-|

Cache
(Fonte 1: http://en.wikipedia.org/wiki/Data_buffer)
A cache acts often also as a buffer, and vice versa. However, cache operates on the premise that the same data will be read from it multiple times, that written data will soon be read, or that there is a good chance of multiple reads or writes to combine to form a single larger block. Its sole purpose is to reduce accesses to the underlying slower storage. Cache is also usually an abstraction layer that is designed to be invisible.

|<<<<<<<<<<<<<<<< ==== Glossário (Dicionário da Informática) ====
(Fonte: http://en.wikipedia.org/wiki/Data_buffer)
Data buffer

(Fonte: http://en.wikipedia.org/wiki/Disk_buffer)
disk cache

|<<<<<<<<<<<<<<<< ==== Glossário (Dicionário da Informática) ====
Filedescriptor – é uma ligação entre um processo e um arquivo em disco.
De uma forma mais simples esta opção permite impor um numero máximo de
ficheiros abertos.

(Fonte: http://pt.wikipedia.org/wiki/Entrada/saída)
I/O (E/S) – Input/Output (Entrada/Saída)

|<<<<<<<<<<<<<<<< ==== Glossário (Dicionário da Informática) ====
——————————————————————————-
Load average
>Load average
(Fonte: http://www.teamquest.com/resources/gunther/display/5/index.htm)
(Fonte: http://pt.wikipedia.org/wiki/Load_average)

load averages: 2.43, 2.96, 3.41

#### Descrição Detalhada:
- Carga Média do Sistema (load average)
- Em resumo, estes são os valores médios dos processos esperando execução ou em execução nos últimos períodos de 1, 5 e 15 minutos.

Aqui vemos que a média do último minuto é 2.43, dos últimos 5 minutos 2.96, e dos últimos 15 minutos 3.41.

Algumas conclusões que podemos tirar disso:

Em média, durante o último minuto, tivemos 2.43 processos rodando ou esperando por recurso na máquina
De maneira geral a carga está tendendo a diminuir, já que as médias vem caindo (3.41, 2.96 e 2.43)
O sistema está ocupado, mas não podemos concluir o quanto apenas pelas load averages.

É importante aqui mencionar que esses valores não levam em conta o número de processos. Outro detalhe importante é que processos podem estar aguardando por qualquer coisa, incluíndo CPU, disco ou rede.

- O que sabemos portanto é que um sistema que tem load averages significativamente mais altos que o número de CPUs está provavelmente bem ocupado, ou travado por algum gargalo ou falta de recurso crítico.

Ver: comando top, comando ps, comando uptime, comando w

|———-^ Load average ———————————————|

|<<<<<<<<<<<<<<<< ==== Glossário (Dicionário da Informática) ====
(Fonte: http://en.wikipedia.org/wiki/Page_cache)
Page cache

|<<<<<<<<<<<<<<<< ==== Glossário (Dicionário da Informática) ====

http://en.wikipedia.org/wiki/Paging

Paging

- The main advantage of paging is that it allows the physical address space of a process to be noncontiguous

(Fonte: http://pt.wikipedia.org/wiki/Payload)
Payload, ou carga útil, em protocolos de comunicação refere-se ao dado real sendo transmitido. Ele é seguido por um cabeçalho que identifica o transmissor e o receptor do dado sendo transportado e é logo descartado assim que chega ao destinatário

——————————————————————————-
(Fonte: http://en.wikipedia.org/wiki/Process_(computing))
Process (computing)
>Process
- a process is an instance of a computer program that is being executed. It contains the program code and its current activity
|———-^ Process (computing) ———————————————|

round-trip times (RTT)

|##########^ Glossário (Dicionário da Informática) ###########################|

###############################################################################
# Conceitos Importante de Informática:
###############################################################################
>Conceitos

|<<<<<<<<<<<<<<<< #### Conceitos Importante de Informática ####

===============================================================================
Asynchronous I/O
===============================================================================
>Assíncrona
Veja também: síncrona

Asynchronous I/O (E/S assíncrona)

http://en.wikipedia.org/wiki/Asynchronous_I/O

http://pt.wikipedia.org/wiki/Comunica%C3%A7%C3%A3o_s%C3%ADncrona

Asynchronous I/O, or non-blocking I/O, is a form of input/output processing that permits other processing to continue before the transmission has finished.

(Fonte: http://pt.wikipedia.org/wiki/Comunica%C3%A7%C3%A3o_s%C3%ADncrona)
Comunicação Assíncrona
Em uma comunicação assíncrona, cada bloco de dados inclui um bloco de informação de controle (chamado flag), para que se saiba exatamente onde começa e acaba o bloco de dados e qual a sua posição na seqüência de informação transmitida. Nesse tipo de comunicação o receptor/transmissor pode encaminhar quantas mensagens ele quiser, desde que a mensagem anterior seja entregue, ele não necessita de uma resposta e sim da conclusão do envio da mensagem.

(Fonte: http://pt.wikipedia.org/wiki/Comunica%C3%A7%C3%A3o_s%C3%ADncrona)
Comunicação Síncrona
Quando um envio é feito, o processo remetente é bloqueado até que a recepção correspondente seja realizada, ou seja, o transmissor/receptor não consegue encaminhar um nova mensagem enquanto a resposta não chega

|==========^ Asynchronous I/O ================================================|

===============================================================================
Archive
===============================================================================

(Fonte: man ar)
-An archive is a single file holding a collection of other files in a structure that makes it possible to retrieve the original individual files (called members of the archive).

|==========^ Archive =========================================================|

===============================================================================
ARP
===============================================================================
>ARP

(CLL2ed-LPIC-2 p. 103)

cat /proc/sys/net/ipv4/neigh/eth0/gc_stale_time

|==========^ ARP =============================================================|

===============================================================================
Autenticação no Linux:
===============================================================================
2.1. The components of the framework

This section outlines the various components that are used to build the authentication system. For each component is given a brief description.

2.1.1. Authentication: PAM and pam_ldap.so

The Pluggable Authentication Module allows integration of various authentication technologies such as standard UNIX, RSA, DCE, LDAP etc. into system services such as login, passwd, rlogin, su, ftp, ssh etc. without changing any of these services.

First implemented by Sun Solaris, PAM is now the standard authentication framework of many Linux distributions, including RedHat and Debian. It provides an API through which authentication requests are mapped into technology specific actions (implemented in the so called pam modules). This mapping is done by PAM configuration files, in which, for each service are basically given the authentication mechanisms to use.

In our case, the pam_ldap module, implemented in the shared library pam_ldap.so, allows user and group authentication using an LDAP service.

Each service that needs an authentication facility, can be configured through the PAM configuration files to use different authentication methods. This means that it is possible, using the PAM configuration files, to write a custom list of requirements that an user must satisfy to obtain access to a resource.

2.1.2. The Name Service Switch and nss_ldap.so

Once an user is authenticated, many applications still need access to user information. This information is traditionally contained in text files (/etc/passwd, /etc/shadow, and /etc/group) but can also be provided by other name services.

As a new name service (such as LDAP) is introduced it can be implemented either in the C library (as it was for NIS and DNS) or in the application that wants to use the new nameservice.

Anyway, this can be avoided using a common, general purpose, name service API and by demanding to a set of libraries the task of retrieving this information performing technology based operations.

This solution was adopted in the GNU C Library that implements the Name Service Switch, a method originated from the Sun C library that permits to obtain information from various name services through a common API.

NSS uses a common API and a configuration file (/etc/nsswitch.conf) in which the name service providers for every supported database are specified.

The databases currently supported by NSS [2] are:

aliases: Mail aliases.

ethers: Ethernet numbers.

group: Groups of users.

hosts: Host names and numbers.

netgroup: Network wide list of host and users.

network: Network names and numbers.

protocols: Network protocols.

passwd: User passwords.

rpc: Remote procedure call names and numbers.

services: Network services.

shadow: Shadow user passwords.

Using the nss_ldap shared library it is possible to implement the maps above using LDAP, anyway here I’ll focus only on the LDAP implementation of shadow, passwd and group database tough all the maps above can be implemented. For most of the other maps it is even unadvisable to store them in ldap, as they tend not to change too often, so it is not a problem to have them locally as files, and storing them in ldap would cause some minor performance loss.

|==========^ Autenticação no Linux ===========================================|

===============================================================================
DNSBL
===============================================================================
>DNSBL

http://en.wikipedia.org/wiki/DNSBL

http://en.wikipedia.org/wiki/SURBL

|==========^ DNSBL ===========================================================|

|<<<<<<<<<<<<<<<< #### Conceitos Importante de Informática ####
===============================================================================
Bulk Transfers
===============================================================================
(Fonte: http://www.beyondlogic.org/usbnutshell/usb4.htm#Bulk)

- Bulk Transfers está relacionado a USB (Pen Drive)

Bulk transfers can be used for large bursty data. Such examples could include a print-job sent to a printer or an image generated from a scanner. Bulk transfers provide error correction in the form of a CRC16 field on the data payload and error detection/re-transmission mechanisms ensuring data is transmitted and received without error.

Bulk transfers will use spare un-allocated bandwidth on the bus after all other transactions have been allocated. If the bus is busy with isochronous and/or interrupt then bulk data may slowly trickle over the bus. As a result Bulk transfers should only be used for time insensitive communication as there is no guarantee of latency.

Bulk Transfers
Used to transfer large bursty data.
Error detection via CRC, with guarantee of delivery.
No guarantee of bandwidth or minimum latency.
Stream Pipe – Unidirectional
Full & high speed modes only.
Bulk transfers are only supported by full and high speed devices. For full speed endpoints, the maximum bulk packet size is either 8, 16, 32 or 64 bytes long. For high speed endpoints, the maximum packet size can be up to 512 bytes long. If the data payload falls short of the maximum packet size, it doesn’t need to be padded with zeros. A bulk transfer is considered complete when it has transferred the exact amount of data requested, transferred a packet less than the maximum endpoint size of transferred a zero-length packet.

The above diagram shows the format of a bulk IN and OUT transaction.

IN: When the host is ready to receive bulk data it issues an IN Token. If the function receives the IN token with an error, it ignores the packet. If the token was received correctly, the function can either reply with a DATA packet containing the bulk data to be sent, or a stall packet indicating the endpoint has had a error or a NAK packet indicating to the host that the endpoint is working, but temporary has no data to send.

OUT: When the host wants to send the function a bulk data packet, it issues an OUT token followed by a data packet containing the bulk data. If any part of the OUT token or data packet is corrupt then the function ignores the packet. If the function’s endpoint buffer was empty and it has clocked the data into the endpoint buffer it issues an ACK informing the host it has successfully received the data. If the endpoint buffer is not empty due to processing a previous packet, then the function returns an NAK. However if the endpoint has had an error and it’s halt bit has been set, it returns a STALL.

|==========^ Bulk Transfers ==================================================|

|<<<<<<<<<<<<<<<< #### Conceitos Importante de Informática ####
===============================================================================
CSR
===============================================================================

(Fonte: http://www.comodobr.com/suporte/csr_jboss.php)
- Um CSR é um arquivo contendo as informações para a solicitação do seu certificado, incluindo a sua chave pública.

JBoss – Gerando um CSR:

Geração do certificado
keytool -genkey -keyalg RSA -alias [nome do certificado] -keystore [nome do arquivo do keystore]

Geração do CSR:
keytool -certreq -keyalg RSA -alias [nome do certificado] -keystore [nome do arquivo do keystore] -file [nome do arquivo de CSR]

Pontos a serem lembrados antes de gerar o seu CSR:
O campo “CN” (Common Name)
Deve ser preenchido com o endereço web para o
qual planeja utilizar o seu Certificado, como por
exemplo a área do seu site onde deseja que os
clientes se conectem utilizando SSL. Um Certificado
SSL emitido para www.comodobr.com não será válido
para seguro.comodobr.com;

O campo “O” (Organization)
Deve ser preenchido com a Razão Social ou Nome Fantasia, sem abreviações ou omissões, exatamente como consta no CNPJ da empresa solicitante;

|<<<<<<<<<<<<<<<< #### Conceitos Importante de Informática #### ==== CSR ====
O campo “OU” (Organizational Unit)
O preenchimento é livre. Caso seja solicitado mais de um certificado para o mesmo Common Name (CN) esta informação deve ser diferente para cada certificado;

O campo “L” (Locality)
Deve ser preenchido com o nome do município onde a empresa se localiza, sem abreviações ou omissões, exatamente como consta no CNPJ;

O campo “S” (State)
Deve ser preenchido com o nome do Estado onde a empresa se localiza, sem abreviações ou omissões

|==========^ CSR =============================================================|

↑– CSR
↓– DNSBL

===============================================================================
DNSBL:
===============================================================================
>DNSBL

What is a DNSBL?

The acronym DNSBL stands for Domain Name System Block List.

|==========^ DNSBL ===========================================================|

↑– DNSBL
↓– File Descriptor

===============================================================================
File Descriptor:
===============================================================================

(Fonte: http://en.wikipedia.org/wiki/File_descriptor)
In computer programming, a file descriptor is an abstract indicator for accessing a file. The term is generally used in POSIX operating systems. In Microsoft Windows terminology and in the context of the C standard I/O library, “file handle” is preferred, though the latter case is technically a different object.

|==========^ File Descriptor =================================================|

↑– DNSBL
|<<<<<<<<<<<<<<<< #### Conceitos Importante de Informática ####
↓– iCalendar

===============================================================================
iCalendar:
===============================================================================

http://en.wikipedia.org/wiki/ICalendar

|==========^ iCalendar =======================================================|

↑– iCalendar
|<<<<<<<<<<<<<<<< #### Conceitos Importante de Informática ####
↓– Input/Output (I/O)

===============================================================================
Input/Output (I/O):
===============================================================================

(Fonte: http://en.wikipedia.org/wiki/Input/output)

|==========^ Input/Output (I/O) ==============================================|

|<<<<<<<<<<<<<<<< #### Conceitos Importante de Informática ####
===============================================================================
Host I/O caching:
===============================================================================

(Fonte: http://www.virtualbox.org/manual/ch05.html#iocaching)

|==========^ Host I/O caching ================================================|

|<<<<<<<<<<<<<<<< #### Conceitos Importante de Informática ####
===============================================================================
Log:
===============================================================================
Tags: >log

Definição:

processo de registro de eventos relevantes num sistema computacional.

|==========^ Log =============================================================|

===============================================================================
MBR:
===============================================================================
>MBR
Tags: Master Boot Record

(Fonte: http://www.vivaolinux.com.br/artigo/CUIDADO-com-o-comando-dd-embora-muito-util-ele-pode-ser-perigoso)
Ao contrário do que muitos falam a respeito do Master Boot Record (O famoso MBR), ele não possui um total de 512 bytes e sim 446. Dos 512 normalmente citados, 66 bytes são usados para guardar informações sobre a tabela de partições do dispositivo.

|<<<<<<<<<<<<<< ==== MBR ====
#### Referências:

http://en.wikipedia.org/wiki/Master_boot_record

|==========^ MBR =============================================================|

===============================================================================
Partições:
===============================================================================
>
Tags:

Quantidade de partições: 1-4 e 5-16 (CLL 123)
Podemos ter no máximo 15 partições com sistema de arquivos em um único disco, sendo 3 primárias e 12 lógicas (CL p. 46)

http://www.vivaolinux.com.br/artigo/Esquemas-de-particionamento-e-sistemas-de-arquivos

http://tldp.org/HOWTO/Partition/partition-types.html#logical

http://www.linuxquestions.org/questions/linux-newbie-8/max-number-of-logical-partition-754458/

http://www.justlinux.com/forum/showthread.php?t=152404

|==========^ Partições =======================================================|

===============================================================================
Reserved Block Count:
===============================================================================
>Reserved Block Count (Linux)

(Fonte: http://www.walkernews.net/2007/02/28/tune2fs-increase-linux-free-disk-space/)
File system Reserved Block Count is supposed to reduce Linux file system defragmentation, to allow root user login for maintenance or to allow Linux system logging facility to function properly in case file system running low of free disk space.

|<< #### Conceitos Importante de Informática #### ==== Reserved Block Count ====
#### Veja Também: (See Also)
tune2fs
dumpe2fs

|==========^ Reserved Block Count ============================================|

===============================================================================
Síncrona I/O
===============================================================================
>Síncrona
Veja também: Assíncrona

Asynchronous I/O (E/S assíncrona)

http://en.wikipedia.org/wiki/Asynchronous_I/O

http://pt.wikipedia.org/wiki/Comunica%C3%A7%C3%A3o_s%C3%ADncrona

Asynchronous I/O, or non-blocking I/O, is a form of input/output processing that permits other processing to continue before the transmission has finished.

(Fonte: http://pt.wikipedia.org/wiki/Comunica%C3%A7%C3%A3o_s%C3%ADncrona)
Comunicação Assíncrona
Em uma comunicação assíncrona, cada bloco de dados inclui um bloco de informação de controle (chamado flag), para que se saiba exatamente onde começa e acaba o bloco de dados e qual a sua posição na seqüência de informação transmitida. Nesse tipo de comunicação o receptor/transmissor pode encaminhar quantas mensagens ele quiser, desde que a mensagem anterior seja entregue, ele não necessita de uma resposta e sim da conclusão do envio da mensagem.

(Fonte: http://pt.wikipedia.org/wiki/Comunica%C3%A7%C3%A3o_s%C3%ADncrona)
Comunicação Síncrona
Quando um envio é feito, o processo remetente é bloqueado até que a recepção correspondente seja realizada, ou seja, o transmissor/receptor não consegue encaminhar um nova mensagem enquanto a resposta não chega

|==========^ Síncrona I/O ================================================|

===============================================================================
Sistemas de Arquivos:
===============================================================================
>Sistemas de Arquivos

http://www.vivaolinux.com.br/artigo/Linux-Sistema-de-arquivos

EXT4:

http://en.wikipedia.org/wiki/Ext4

List of file systems

———-
Ext2

O sistema de arquivos ext2 é conhecido como “Second Extended FileSystem”. Foi desenvolvido para ser mais “eficiente” que o sistema de arquivos “Minix”, seu antecessor.

O Minix era muito utilizado nas primeiras versões do Linux, e foi utilizado por muitos anos.

O sistema de arquivos ext2 não possui journaling e foi substituído pelo ext3.

———
Ext3

O sistema de arquivos ext3 é uma versão do ext2 com suporte a journaling. Portanto, o ext3 tem as mesmas características do ext2, mas com suporte journaling.

Essa característica foi uma evolução e tornou o ext3 um sistema de arquivos muito estável e robusto.

Como no ext3 só foi adicionado o suporte a journaling, podemos converter um sistema de arquivos ext2 para ext3, adicionado suporte a journaling, e também podemos converter um sistema de arquivos ext3 para ext2, removendo o suporte a journaling.

|==========^ Sistemas de Arquivos ============================================|

↑– Sistemas de Arquivos
↓– Site Survey

===============================================================================
Site Survey:
===============================================================================

(http://www.teleco.com.br/tutoriais/tutorialrwlanman3/pagina_2.asp)
O que é Site Survey?

O site survey é a realização de inspeção técnica nos locais onde serão instalados os equipamentos de rádio freqüência da rede sem fio. Este levantamento tem a finalidade de dimensionar a área e identificar o local mais apropriado para a instalação do(s) AP(s), a quantidade de células e de pontos de acesso necessários para que as estações clientes tenham qualidade de sinal aceitável de recepção, acesso à rede e utilizar aplicações e recursos de modo compartilhado.

|==========^ Site Survey =====================================================|

↑– Site Survey
↓– Spam

===============================================================================
Spam:
===============================================================================
>Spam
Tags: Anstispam

|<<<<<<<<<<<<<< ==== Spam ====

——————————————————————————-
Gerencial:

Responder aos seguintes questionamentos:

- Quais domínios devem ser liberados na White List?
– Restrição: Spammers podem forjar o endereço de origem da mensagem;

|—————————————————————————–|

Conceitos:
Bayesian statistical DNA fingerprinting -  The new v2.x release of SPAM Filter ISP features statistical DNA fingerprinting of incoming emails. This filter is self-learning, continuously analyzing your incoming traffic to improve its accuracy with time.

Bayesian Filter Threshold – Use this slider to control the accuracy of the statistical filter. Incoming emails are assigned a probability of being Spam, ranging from 0% (most likely a valid email) to 100% (most likely Spam). Any emails that have a probability of being spam above the value you set will be rejected. Typical threshold values are in the 99.9% range.

——————————————————————————-
#### No antispam FortiMail 2000A a mensagem abaixo refere-se a um IP
## que está na Black List do FORTIGUARD ANTISPAM:

FortiGuard AntiSpam-IP
(Fonte: http://www.fortiguard.com/antispam/antispam.html)
|—————————————————————————–|

#### Sites para verificar as Blacklist (Reputação de Sites e Endereços):
# URI REPUTATION DATA

http://www.surbl.org/surbl-analysis

http://www.fortiguard.com/antispam/antispam.html

http://en.wikipedia.org/wiki/SURBL

# Sorbs

http://www.au.sorbs.net/lookup.shtml

Veja também:

http://www.surbl.org/

|==========^ Spam ============================================================|

↑– Spam
↓– Suporte

===============================================================================
Suporte:
===============================================================================
>Suporte
>Análises
Tags: Análises, Suporte Técnico, Regras,
Ver: Spam

### Para quem trabalha no suporte técnico:

——————————————————————————-
O usuário deverá informar os e-mails que não estão conseguindo enviar e-mail.
——————————————————————————-

——————————————————————————-
Ao assumir um serviço (servidor):

1. Verificar o “history”;
2. Verificar o arquivo /etc/crontab;
——————————————————————————-

|==========^ Suporte ==========================================================|

↑– Suporte
↓– Throughput

===============================================================================
Throughput (ou taxa de transferência):
===============================================================================

(Fonte: http://pt.wikipedia.org/wiki/Throughput)
Throughput (ou taxa de transferência) é a quantidade de dados transferidos de um lugar a outro, ou a quantidade de dados processados em um determinado espaço de tempo, pode-se usar o termo throughput para referir-se a quantidade de dados transferidos em discos rígidos ou em uma rede, por exemplo; tendo como unidades básicas de medidas o Kbps, o Mbps e o Gbps. O throughput pode ser traduzido como a taxa de transferência efetiva de um sistema. A taxa de transferência efetiva de um determinado sistema (uma rede de roteadores por exemplo) pode ser menor que a taxa de entrada devido às perdas e atrasos no sistema.

Throughput é diferente da largura de banda nominal.

Por exemplo, podemos ter um link de 2Mbps mas tendo acesso a um conteúdo onde o roteamento dos seus dados passe por um link de 1Mbps. Neste caso, o throughput será considerado pelo menor.

|==========^ Throughput (ou taxa de transferência) ===========================|

Monitoring Port Error Packets
To view the error statistics for a port:
1. Highlight
Port Error Packets on the Network Monitoring Menu.
2. Press
the
Enter key. The following screen is displayed.
The Packet Error Statistic screen displays the following for received frames:
– CRC Error–Counts Cyclic Redundancy Check (CRC) errors.
– Undersize–Displays the number of frames detected that are less than the minimum
permitted frame size of 64 bytes and have a good CRC. Undersized frames usually
indicate collision fragments, a normal network occurrence.
– Oversize–Counts packets received that were longer than 1518 octets, or if a VLAN
frame, 1522 octets, and less than the MAX_PKT_LEN. Internally, MAX_PKT_LEN
is equal to 1522.
– Fragment–Displays the number of packets less than 64 bytes with either bad
framing or an invalid CRC. These packets are normally the result of collisions.
– Jabber–Displays the number of frames with lengths more than the
MAX_PKT_LEN bytes. Internally, MAX_PKT_LEN is equal to 1522.
– Drop Pkts–Displays the number of frames that were dropped by this port since the
last switch module reboot.
The Packet Error Statistic screen displays the following for transmitted frames:
– ExDefer–Counts the number of frames for which the first transmission attempt on a
particular interface was delayed because the medium was busy.
– Late Coll.–Counts the number of times that a collision is detected later than 512 bit-
times into the transmission of a packet.

↑– Spam
↓– Suporte

===============================================================================
WebDAV:
===============================================================================
>WebDAV

WebDAV stands for “Web-based Distributed Authoring and Versioning”

(Fonte: http://en.wikipedia.org/wiki/WebDAV)
Web-based Distributed Authoring and Versioning (WebDAV) is a set of methods based on the Hypertext Transfer Protocol (HTTP) that facilitates collaboration between users in editing and managing documents and files stored on World Wide Web servers. WebDAV was defined in RFC 4918 by a working group of the Internet Engineering Task Force (IETF).

http://www.webdav.org/

|==========^ WebDAV ==========================================================|

|##########^ Conceitos Importante de Informática #############################|

###############################################################################
# Inglês para Linux
###############################################################################
>Inglês
>English

===============================================================================
Inglês Para Linux:
===============================================================================

——————————-
against
- preposition
contra
de encontro a
diante
contrário
defronte
em oposição a
em comparação a
em previsão de
|—————————–|

——————————-
append
- verb
acrescentar
anexar
juntar
apor
fixar
pendurar
|—————————–|

——————————-
chunks
pedaços
|—————————–|

——————————-
find out
- verb
descobrir
encontrar
achar
apurar
procurar
entrever
detestar
|—————————–|

——————————-
How must…
Como deve ser …

|—————————–|

——————————-
issue

- noun
questão
edição
entrega
descendência
filhos
desenlace
ponto controverso
emanação
filho
produção em dado momento

- verb
emitir
publicar
expedir
baixar
surgir
sair
brotar
provir
descarregar
|—————————–|

leading – principal
leading directory – diretório principal;

——————————-
often   [’ɒfən, ’ɒftən] [US]
adverb
freqüentemente
amiúde
|—————————–|

——————————-
pipe
- noun
tubo
cachimbo
cano
pipa
canudo
gaita de foles
vias respiratórias
tubo de órgão
traquéia
flauta de cana
coisa fácil
apito de contramestre
apito de bordo
gaita pastoril

- verb
assobiar
sibilar
silvar
tocar gaita de foles
|—————————–|

——————————-
present

- noun
presente
atualidade
oferta
tempo atual
brinde
época presente

- verb
apresentar
mostrar
expor
oferecer
presentear
exibir
pôr em presença de

- adjective
presente
atual
vigente
em questão
que esta à vista
|—————————–|

——————————-
prune
- verb
podar
aparar
suprimir
desbastar

|—————————–|

——————————-
reliable
- adjective
confiável
de confiança
seguro
fidedigno
fiel
sólido
certo
durável
|—————————–|

——————————-
relies
baseia-se
confia
|—————————–|

——————————-
Rise up
Levanta-tex’
|—————————–|

——————————-
so that it…
para que ele…
|—————————–|

——————————-
spare

reposição

- verb
poupar
dispensar
economizar
ceder
passar sem
privar-se de

- adjective
sobressalente
livre
de reserva
disponível
extra
vago
escasso
|—————————–|

——————————-
stream   [stri:m] [US]
- noun
andar
córrego
regato
arroio
riacho
corrente
curso de água
ribeiro
raio de luz

Fluxo

Stream Editor – Editor de Fluxo
|—————————–|

——————————-
striping
distribuição
|—————————–|

——————————-
threshold
- noun
limiar
soleira
entrada
começo
princípio

|—————————–|

——————————-
thus
- adverb
assim
portanto
deste modo
por conseguinte
desta maneira
até
tanto
nestas condições

|—————————–|

trailing – à direita

——————————-
whole   [həʋl] [US]
adjective
inteiro
completo
integral
de boa saúde
são
germano
|—————————–|

|=============================================================================|
|##########^ Inglês Para Linux ###############################################|

###############################################################################
# Outras Coisas:
###############################################################################

### Ao tentar compilar um programa:
*** The glib-config script installed by GLIB could not be found
*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GLIB_CONFIG environment variable to the
*** full path to glib-config.
configure: error: Test for glib failed.
GNU Midnight Commander requires glib 1.2.6 or above.

### Sol.: apt-get install libglib2.0-dev

### configure: error: Slang header not found

#### Sol.: apt-get install libslang2-dev

|##########^ Outras Coisas ###################################################|

(Fonte: http://www.linuxquestions.org/questions/linux-newbie-8/square-brackets-in-output-of-ps-aux-not-matching-output-of-ps-ejh-716134/)
Is this what you are looking for?

Kernel Threads
Kernel threads consist of a set of registers, a stack, and a few corresponding kernel data structures. When kernel threads are used, the operating system will have a descriptor for each thread belonging to a process and it will schedule all the threads. Unlike processes, all threads within a process share the same address space. Similar to processes, when a kernel thread makes a blocking call, only that thread blocks. All modern machines support kernel threads, most often via the POSIX threads interface “pthreads”. Some dedicated parallel machines support kernel threads poorly or not at all. For example, the Blue Gene/L microkernel does not support pthreads.

The purported advantage of kernel threads over processes is faster creation and context switching compared with processes. For shared-memory multiprocessor architectures, the kernel is able to dispatch threads of one process on several processors, which leads to automatic load balancing within the nodes. For parallel programming, threads allow different parts of the parallel program to communicate by directly accessing each others’ memory, which allows very efficient, fine-grained communication.

Kernel threads share a single copy of the entire address space, including regions such as global data that may cause conflicts if used by multiple threads simultaneously. Threads can also cause unintentional data sharing, which leads to corruption and race conditions. To avoid this unintentional sharing, programs must often be modified to either lock or access separate copies of common data structures. Several very widely used language features are unsafe when used with threads, such as the use of global and static variables, or the idiom of returning a reference to a static buffer. Especially with large existing codebases with many global variables, this makes kernel threads very difficult to use because in most implementations of kernel threads, it is not possible to assign each thread a private set of global variables.

Kernel threads are considered “lightweight,” and one would expect the number of threads to only be limited by address space and processor time. Since every thread needs only a stack and a small data structure describing the thread, in principle this limit should not be a problem. But in practice, we found that many platforms impose hard limits on the maximum number of pthreads that can be created in a process. Table 2 in Section 4 shows the practical limitations on pthreads on several stock systems.

In particular, operating system kernels tend to see kernel threads as a special kind of process rather than a unique entity. For example, in the Solaris kernel threads are called “light weight processes” (LWP’s). Linux actually creates kernel threads using a special variation of fork called “clone,” and until recently gave each thread a separate process ID. Because of this heritage, in practice kernel threads tend to be closer in memory and time cost to processes than user-level threads, although recent work has made some progress in closing the gap, including K42 [5] and the Native POSIX Threading Library (NPTL) and Linux O(1) scheduler.

  1. Nenhum comentário ainda.
  1. Nenhum trackbacks ainda.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Sair / Alterar )

Imagem do Twitter

You are commenting using your Twitter account. Sair / Alterar )

Foto do Facebook

You are commenting using your Facebook account. Sair / Alterar )

Connecting to %s

Seguir

Obtenha todo post novo entregue na sua caixa de entrada.