How to use “tail” in MSL log files

Have you ever needed to look at the last entries in a log file.

Of course you have.

For example you want to see the last errors in the /var/logs/mail.log file

If you open it with NANO or some other txt editing programme you will have to scroll all the way to the bottom.

AND if more entries are logged while you are already in the file you will not see them!

This is a pain

“Tail” is very useful because in its simplest form

tail /var/logs/mail.log

It will show you the last 10 lines of txt form the log file

If you add the -f command it will follow the file. Meaning if any lines are added to the log file they will appear real time

tail -f /var/logs/mail.log

Use the “-F” option to force tail to follow file names rather than file objects. This can prevent problems with log rotation and other programs that may alter file names.

Filter Lines in Followed Logs with grep

The grep tool can be combined with tail to filter the contents of a log file in real time. Consider the following examples:

tail -F procmail.log | grep -e “^Subject”
tail -F access.log | grep “404″
In the first command, only the lines of the procmail.log file that begin with the characters “Subject” are printed. All other lines are discarded.

In the second invocation, only entries from the access log that contain the characters “404″ will be printed. All other lines are discarded.

-n, –lines=N
output the last N lines, instead of the last 10

–retry, keep trying to open a file even if it is inaccessible when tail starts or if it becomes inaccessible later  useful only with -f

[hdvideo id=23]

Using putty as a socks5 proxy

You can use the MBG to VPN to a customers network but this is another trick in your box.

From your office putty into the external address of the MBG

(This has to be allowed in the remote access section of MSL)

Setup tunnels in Putty, see below, copy this and click Add. Make sure to choose “dynamic” and “Auto”

 

putty-tunnel1

 

As some of the Mitel kit requires Internet explorer(IE) i will use it as my example.

In IE choose internet options, connections,LAN settings

putty-tunnel2

 

Now you can web browse to any web site on the customer network, including the 3300, MBG, Nupoint, ETC

How to CHECKSUM a file

Recently i have had a couple of bad downloads from the Mitel download site. Unfortunatley i did not know until i came to use the ISO.

Mitel Provide the CHECKSUM number for all there downloads.

To find the CHECKSUM of a file you will need to download one of the many UTILS available

I use Microsoft’s Checker

This will give you two files FCIV.exe is the useful one.

Open a command prompt

Drop the FCIV.exe file into the command prompt window then type ” -add ”

Then drag and drop the ISO you want the CHECKSUM of into the CMD window

It should look something like this

CHECKSUM

Then press enter and it when finsihed it will look like this (length of time depends on how big the file is)

CHECKSUM2

Now check that number against the number displayed on the download page of MITEL next to the download link

How to mount ISO as CDROM

This is useful for vMAS. Instead of transfering the ISO to the datastore of your VMWARE server, tranfer it to the mas via SFTP then mount the iso with these command.

I use it when installing the Nupoint DVD_2.

Procedure to mount ISO images under Linux

1) You must login as a root user, if not root user then switch to root user using following command:
$ su -

2) Create the directory i.e. mount point:
# mkdir -p /mnt/cdrom

3) Use mount command as follows to mount iso file called disk1.iso:
# mount -o loop disk1.iso /mnt/cdrom

4) Change directory to list files stored inside an ISO image:
# cd /mnt/cdrom
# ls -l

5) When finished you can unmount the cdrom
# umount /cdrom

More about loop device

A loop device is a pseudo-device that makes a file accessible as a block device. Loop devices are often used for CD ISO images and floppy disc images. Mounting a file containing a filesystem via such a loop mount makes the files within that filesystem accessible. They appear in the mount point directory using above commands

Mitel 3300 LOST ROOT admin password

Source

Have you lost the ROOT password for the system?!

If you have another user with “system” access you can try running

RESET_LOGIN_PASSWORD “username” from the Maintenance page

OR

ResetLoginPassword from putty RAW port 2002

OR

from the RS232 port on the front

 

Example from telnet = ResetLoginPassword system

 

More information

 

This should be done from the maintainance port, if you are only connected via IP then open Putty and open a RAW connection to the controller on port 2002 then type…

4.1 and above:-

type the command ResetAllLoginPasswords (see Below)

-> ResetAllLoginPasswords
Attempting to Reset Password for all System Admin Users.
The password has been successfully reset to default password ‘password’ for User
‘cvd’.
Resetting Password for all System Admin Users complete.
value = 0 = 0x0

If you know the user name that you wish to reset you can do this using the following

-> ResetLoginPassword “system”
Attempting to Reset Password for User ‘system’.
The password has been successfully reset to default password ‘password’ for User
‘system’.
value = 0 = 0x0

 

MBG daisy chaining

MBG – Installation and Maintenance Guide

Setting up Daisy Chained Servers

For geographically remote servers:

  1. Configure your upstream MBG server as usual (either Gateway or DMZ deployment).
  2. On the downstream server, use the MBG web interface to configure the following

parameters:

  •  On the Configuration tab, select Network Profiles and then click Put Into

Daisychain Mode.

  • In the Daisy-Chain IP address field, enter the IP address of the upstream MBG

server.

  •  Click Save.

Notes:

  • Downstream server can be in either Gateway or DMZ deployment mode.
  • Add sets and configuration changes to the upstream server only.

For remote offices with high volume of remote sets:

This scenario can be configured in one of the following two ways:

  1. Remote (downstream) office uses an MBG server operating in Gateway mode as the Internet firewall.
  2. Remote office has a separate firewall and runs the MBG server in DMZ mode.

In either case the configuration described under For geographically remote servers should be
done on the downstream server.

Note: There is no restriction on the location of remote sets – they do not have to be on
the LAN side of the server. So it is possible (and may be desirable) to have Internet MBG
sets also point to the downstream server to maintain local streaming with sets on the
remote LAN.

mbg daisychain2

 

mbg daisychain

How to access the 3300 console via IP

Want to issue command to the 3300 via IP instead of a serial cable?

Issue commands such as:

Restart Web server or restart the FTFP server or restart the embedded voicemail

You will need a terminal emulator, i use putty

Use the settings below, change the IP to match your controller obviously.

You will need the same credentials you use to log onto the web page .

Putty main page

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

putty IP