Archive

Archives pour la catégorie ‘Matériel’

Ubuntu Check RAM Memory Chip Speed and Specification From Within a Linux System

22/06/2016 Comments off

I want to add more RAM to my server running Ubuntu Linux. How do I find out my current RAM chip information such as its speed, type and manufacturer name within a Linux system without opening the case?

You need to use the dmidecode command which is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components (such as RAM), as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve hardware information without having to probe for the actual hardware. Open a command-line terminal (select Applications > Accessories > Terminal), and then type:

$ sudo dmidecode --type memory

OR

# dmidecode --type memory | less

OR

$ sudo dmidecode --type 17

Sample outputs:

# dmidecode 2.10
SMBIOS version fixup (2.51 -> 2.6).
SMBIOS 2.6 present.
Handle 0x0011, DMI type 16, 15 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 4 GB
	Error Information Handle: Not Provided
	Number Of Devices: 4
Handle 0x0012, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0011
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM#1A
	Bank Locator: Bank 1
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified
Handle 0x0013, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0011
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM#2A
	Bank Locator: Bank 2
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified
Handle 0x0014, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0011
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM#1B
	Bank Locator: Bank 1
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified
Handle 0x0015, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0011
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM#2B
	Bank Locator: Bank 2
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: Not Specified
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified

Change the firewall manually to make your Synology more safe!

08/03/2016 Comments off

Source: Changzhou Chen

The default firewall in the Control Panel is so poor because of the poor design of Synology’s firewall policy. You can not use the white list in the global environment if you have both IPv4 or IPv6 network environment. To decrease the risk of being hacked, I’ve decided to change the firewall manually. We should use iptables and ip6tables to change both IPv4 and IPv6 firewall. If you don’t have the need for IPv6 network environment, you can ignore the ip6tables part.

Warning: If you don’t have enough IT experience, you should run the following sections carefully. Maybe you will lose your connection to your Synology and find it hard to connect to it again.

I wrote some IPv4 rules, the following code section is part of the rule file, you can run the iptables-save to export the rule file:

DiskStation> iptables-save > ipv4
# For your simple reference, I delete the
# unuseful part of rule file which exported by iptables-save. The following
# part is completely different from the file exported by iptables-save.
DiskStation> cat ipv4
*filter
:INPUT DROP # Drops all inbound connections that doesn't use the following rules
:FORWARD ACCEPT # It may be default, you can ignore it
:OUTPUT ACCEPT # It may be default, you can ignore it
-A INPUT -i lo -j ACCEPT # Allows all loopback (lo0) traffic
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Accepts all established inbound connections
-A INPUT -s 192.168.1.1/255.255.255.0 -j ACCEPT # Allows your Intranet inbound connections
-A INPUT -s 1.2.3.4 -j ACCEPT # Allows the specified ip address inbound connections
COMMIT

After run the iptables-restore and iptables -L, you can see the following result:

DiskStation> iptables-restore < ipv4
DiskStation> iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
DEFAULT_INPUT  all  --  anywhere             anywhere
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Chain DEFAULT_INPUT (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  192.168.1.0/24       anywhere
ACCEPT     all  --  1.2.3.4              anywhere

Lire la suite…

Digital Equipment Corporation PDP-12

23/02/2016 Comments off

The PDP-12 was a 12 bit machine introduced in 1969. It sold for $27,900. The PDP-12 was designed as a successor to the LINC-8 and was compatible with LINC-8 software.

DEC.PDP-12.1963.102646098

Programmed Data Processor (PDP) was a series of minicomputers made and marketed by the Digital Equipment Corporationfrom 1957 to 1990. The name « PDP » intentionally avoided the use of the term « computer » because, at the time of the first PDPs, computers had a reputation of being large, complicated, and expensive machines, and the venture capitalists behind Digital (especially Georges Doriot) would not support Digital’s attempting to build a « computer »; the word « minicomputer » had not yet been coined.[citation needed] So instead, Digital used their existing line of logic modules to build a Programmed Data Processor and aimed it at a market that could not afford the larger computers.

The various PDP machines can generally be grouped into families based on word length.

Members of the PDP series include:

PDP-1

The original PDP, an 18-bit machine used in early time-sharing operating system work, and prominent in MIT’s early hacker culture, which was to lead to the (Massachusetts) Route 128 hardware startup belt (DEC’s second home, Prime Computer, etc.). What is believed to be the first video game, Spacewar!, was developed for this machine, along with the first known word processing program for a general-purpose computer, « Expensive Typewriter ».

PDP-2

A number reserved for an unbuilt, undesigned 24-bit design.

PDP-3

First DEC-designed (for US « black budget » outfits) 36-bit machine, though DEC did not offer it as a product. The only PDP-3 was built by the CIA’s Scientific Engineering Institute (SEI) in Waltham, MA to process radar cross section data for the Lockheed A-12 reconnaissance aircraft in 1960.[1][2] Architecturally it was essentially a PDP-1 controlling[citation needed] a PDP-1 stretched to 36-bit word width.[3]

PDP-4

pdp4

PDP-4

18-bit machine intended to be a slower, cheaper alternative to the PDP-1; it was not considered commercially successful. All later 18-bit PDP machines (7, 9 and 15) were based on a similar, but enlarged instruction set, more powerful, but based on the same concepts as the 12-bit PDP-5/PDP-8 series. One customer of these early PDP machines was Atomic Energy of Canada. The installation at Chalk River, Ontario included an early PDP-4 with a display system and a new PDP-5 as interface to the research reactor instrumentation and control.

PDP-5

DEC’s first 12-bit machine. Introduced the instruction set later expanded, in the PDP-8, to handle more bit rotations and to increase the maximum memory size from 4K words to 32K words. It was the first computer series with more than 1,000, then 10,000 built, which was a large number in the decade after ENIAC/UNIVAC builders predicted that 3 computers would serve the nations computing needs.

PDP-6

pdp6

PDP-6

36-bit timesharing machine. Very elegant architecture; introduced the instruction set later used in the PDP-10 and DECSYSTEM-20. It was considered by its detractors a large minicomputer or, by DEC fans especially, Big Iron – a mainframe As a timesharing machine, it constantly outran the batch-oriented IBM System/360 and even IBM System/370-series mainframes.

PDP-7

pdp7

PDP-7

Replacement for the PDP-4; DEC’s first wire-wrapped machine. The first version of Unix, and the first version of B, a predecessor of C, were written for this machine at Bell Labs, as was the first version (by DEC) of MUMPS.

 

 

 

 

 

 

PDP-8

R00000254-hp

PDP-8

12-bit machine with a tiny instruction set; DEC’s first major commercial success and the start of the minicomputer revolution. Many were purchased (at discount prices, a DEC tradition, which also included free manuals for anyone who asked during the Ken Olsen years) by schools, university departments, and research laboratories. Later models were also used in the DECmate word processor and the VT-78 workstation. It is reported that Edson de Castro, who had been a key member of the design team, left to form Data General when his design for a 16-bit successor to the PDP-8 was rejected in favour of the PDP-11; the « PDP-X » did not resemble the Data General Nova,[4] although that is a common myth.

LINC-8

A hybrid of the LINC and PDP-8 computers; two instruction sets. Progenitor of the PDP-12.

PDP-9

Successor to the PDP-7; DEC’s first micro-programmed machine. It featured a speed increase of approximately twice that of the PDP-7. The PDP-9 was also one of the first small or medium scale computers to have a keyboard monitor system based on DIGITAL’s own small magnetic tape units (DECtape).[5] The PDP-9 established minicomputers as the leading edge of the computer industry.

PDP-10

36-bit timesharing machine, and fairly successful over several different models. The instruction set was a slightly elaborated form of that of the PDP-6.

PDP-11

11_panel_2

PDP-11

PanelInCase_Side

PDP-11/70

The archetypal minicomputer; a 16-bit machine and another commercial success for DEC. The LSI-11 was a four-chip PDP-11 used primarily for embedded systems. The 32-bit VAX series was descended from the PDP-11, and early VAX models had a PDP-11 compatibility mode. The 16-bit PDP-11 instruction set has been very influential, with processors ranging from the Motorola 68000 to the Renesas H8 and Texas Instruments MSP430, inspired by its highly orthogonal, general-register oriented instruction set and rich addressing modes. The PDP-11 family was extremely long-lived, spanning 20 years and many different implementations and technologies.

PDP-12

PDP-12

PDP-12

MINOLTA DIGITAL CAMERA

Descendant of the LINC-8; with slight redesign, and different livery, officially followed by, and marketed as, the « Lab-8 ». See LINC and PDP-12 User Manual.

PDP-13

Designation was not used, apparently due to superstition.

PDP-14

A machine with 12-bit instructions, intended as an industrial controller (PLC). It had no data memory or data registers; instructions could test Boolean input signals, set or clear Boolean output signals, jump conditional or unconditionally, or call a subroutine. Later versions (for example, the PDP-14/30) were based on PDP-8 physical packaging technology. I/O was line voltage.

PDP-15

PDP-15

PDP-15

DEC’s final 18-bit machine. It was its only 18-bit machine constructed from TTL integrated circuits rather than discrete transistors, and, like every DEC 18-bit system (except mandatory on the PDP-1, absent on the PDP-4) had an optional integrated vector graphics terminal, DEC’s first improvement on its early-designed 34n where n equalled the PDP’s number. Later versions of the PDP-15 ran a real-time multi-user OS called « XVM ». The final model, the PDP-15/76 used a small PDP-11 to allow Unichannel peripherals to be used.

PDP-16

PDP-16/M

PDP-16/M

A « roll-your-own » sort of computer using Register Transfer Modules, mainly intended for industrial control systems with more capability than the PDP-14. The PDP-16/M was introduced as a standard version of the PDP-16.

AppleKeyboard on Ubuntu

07/12/2015 Comments off

Source: ubuntu.com

Preface

Since Ubuntu 8.04 (Hardy Heron) the USB aluminum Apple Keyboard has not worked correctly. A change was added to the Ubuntu Linux kernel to make Apple MacBook keyboards gain additional functionality to their limited laptop style keyboard (Ubuntu bug #162083). Unfortunately this code change has some side effects for owners of the full size USB aluminum Apple Keyboard:

  • Function keys have media functions as default (as the printing on the keycaps indicates). To access the regular F-key functionality, the « fn » key must be pressed and held (except for F5 and F6, which are inverted in this respect). (Ubuntu bug #201711)
  • On international (non-US) keyboards, two keys are swapped with respect to the printing on the keycaps. (Ubuntu bug #214786)

Both issues may be straightened out with two configurable module parameters (http://bugzilla.kernel.org/show_bug.cgi?id=10818), as shown below.

To make the keyboard behave more like a standard PC keyboard (but against the orinal printing on the keycaps), additional steps are necessary:

  • Map SysRQ, Scoll Lock, and Pause keys to F13-F15: This still requires a patch that adds a configurable option to the kernel module, or a « keyfuzz » workaround (#262408).
  • Swap the cmd and super keys: (hid_apple patch) or keyfuzz workaround.

A tar archive containing all workarounds can be found at (un-apple-keyboard)

If you would like to have a better integration, please help by enhancing the patches to implement proper module parameters, and submitting them to the upstream kernel developers. See also: Trouble With Apple Keyboard On Ubuntu

To find the the keycode of any key that you want to modify, simply run in a terminal

xev | sed -n ‘s/^.*keycode *\([0-9]\+\).*$/keycode \1 = /p’

Then you can find the List of Keysyms Recognised by Xmodmap:

http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap

http://wiki.linuxquestions.org/wiki/ConfiguRing_keyBoards

Default Behavior

This section describe the default behavior of every Apple keyboard.

Apple slim aluminum keyboard (0220)

wired_1_20070813a.jpg

  • Characters that are not printed on the keycaps (~,{},[],…) can still be generated as on a standard PC keyboard.
  • Even if the @ is printed on another keycap as on the standard PC layout, that key will only behave like the standard PC layout key and not generate the @. Use your localized standard PC layout key (combination) to generate the @.
  • ‘fn’+’F-Key’ -> triggers the regular F-Key
  • ‘fn’+’Enter’ -> Insert
  • ‘fn’+’Backspace’ -> Delete
  • ‘fn’+’Up’ -> PageUp
  • ‘fn’+’Down’ -> PageDown
  • ‘fn’+’Left’ -> Home
  • ‘fn’+’Right’ -> End
  • ‘Clear’ behaves like ‘NumLock‘ (Numlock may also be switched by pressing fn-F6 twice)

(See #262408 as there is patch submit to map F13, F14 and F15 to the otherwise missing PrintScreen, ScrollLock and Pause keys.)

Lire la suite…

Categories: Matériel, Système Tags: ,

How to drive a 7 segment display directly on Raspberry Pi in Python

20/11/2015 Comments off

7 segment displayLast week I bought some 4-digit, 7-segment displays to experiment with. Strangely enough it was something I’d never tried before, so I was interested to see how they work. I googled around looking to see if someone else had done this before. It seems there are several different sorts of 7-segment displays, so you have to find a good match for the one you’ve bought.

You can get them in various guises including: i2c backpack; 12 pins; 16 pins; resistors built-in; common anode; common cathode etc.

The ones I bought are 12 pin, bare, no backpack, no PCB, no resistors, common cathode. Here’s what they look like…

7-segment display – rear

7-segment display – rear

7-segment display

7-segment display

Lire la suite…

Categories: Matériel, Tutoriel Tags: